fix: catch more ssh failure modes with help

This commit is contained in:
2022-02-03 13:43:11 +01:00
parent 5237c7ed50
commit bfeda40e34
4 changed files with 32 additions and 7 deletions

View File

@ -67,13 +67,13 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*connhelper.Conne
return nil, err
}
func NewConnectionHelper(daemonURL string) *connhelper.ConnectionHelper {
func NewConnectionHelper(daemonURL string) (*connhelper.ConnectionHelper, error) {
helper, err := GetConnectionHelper(daemonURL)
if err != nil {
logrus.Fatal(err)
return nil, err
}
return helper
return helper, nil
}
func getDockerEndpoint(host string) (docker.Endpoint, error) {