Increase ssh command timeout and improve error message

- My `github/github` codespace failed to start within 10s
- Output more precise error message
This commit is contained in:
Mislav Marohnić 2021-07-15 16:10:03 +02:00
parent e108b5d18f
commit d506a97419

View file

@ -111,8 +111,8 @@ func SSH(sshProfile string) error {
time.Sleep(1 * time.Second)
}
if retries == 10 {
return errors.New("Failed to start codespace")
if retries == 30 {
return errors.New("timed out while waiting for the codespace to start")
}
codespace, err = apiClient.GetCodespace(ctx, token, codespace.OwnerLogin, codespace.Name)