@@ -99,10 +99,10 @@ func addUserData(ctx CommandContext, userdatas []string, serverID string) {
9999 }
100100}
101101
102- func runShowBoot (ctx CommandContext , args RunArgs , serverID string , closeTimeout chan struct {}, timeoutExit chan struct {}) error {
102+ func runShowBoot (ctx CommandContext , args RunArgs , serverID , region string , closeTimeout chan struct {}, timeoutExit chan struct {}) error {
103103 // Attach to server serial
104104 logrus .Info ("Attaching to server console ..." )
105- gottycli , done , err := utils .AttachToSerial (serverID , ctx .API .Token )
105+ gottycli , done , err := utils .AttachToSerial (serverID , ctx .API .Token , ctx . API . ResolveTTYUrl () )
106106 if err != nil {
107107 close (closeTimeout )
108108 return fmt .Errorf ("cannot attach to server serial: %v" , err )
@@ -242,11 +242,11 @@ func Run(ctx CommandContext, args RunArgs) error {
242242 }()
243243 }
244244 if args .ShowBoot {
245- return runShowBoot (ctx , args , serverID , closeTimeout , timeoutExit )
245+ return runShowBoot (ctx , args , serverID , ctx . API . Region , closeTimeout , timeoutExit )
246246 } else if args .Attach {
247247 // Attach to server serial
248248 logrus .Info ("Attaching to server console ..." )
249- gottycli , done , err := utils .AttachToSerial (serverID , ctx .API .Token )
249+ gottycli , done , err := utils .AttachToSerial (serverID , ctx .API .Token , ctx . API . ResolveTTYUrl () )
250250 close (closeTimeout )
251251 if err != nil {
252252 return fmt .Errorf ("cannot attach to server serial: %v" , err )
0 commit comments