fix: catch more ssh failure modes with help
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -463,14 +463,17 @@ developer machine.
|
||||
|
||||
cl, err := newClient(c, domainName)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
cleanUp(domainName)
|
||||
logrus.Debugf("failed to construct client for %s, saw %s", domainName, err.Error())
|
||||
logrus.Fatalf(fmt.Sprintf(internal.ServerAddFailMsg, domainName))
|
||||
}
|
||||
|
||||
if provision {
|
||||
logrus.Debugf("attempting to construct SSH client for %s", domainName)
|
||||
sshCl, err := ssh.New(domainName, sshAuth, username, port)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
cleanUp(domainName)
|
||||
logrus.Fatalf(fmt.Sprintf(internal.ServerAddFailMsg, domainName))
|
||||
}
|
||||
defer sshCl.Close()
|
||||
logrus.Debugf("successfully created SSH client for %s", domainName)
|
||||
@ -485,7 +488,7 @@ developer machine.
|
||||
|
||||
if _, err := cl.Info(context.Background()); err != nil {
|
||||
cleanUp(domainName)
|
||||
logrus.Fatalf("couldn't make a remote docker connection to %s? use --provision/-p to attempt to install", domainName)
|
||||
logrus.Fatalf(fmt.Sprintf(internal.ServerAddFailMsg, domainName))
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user