Merge pull request #3703 from tstromberg/ssh-err

Make non-zero ssh error codes less dramatic
pull/3707/head
Thomas Strömberg 2019-02-16 09:23:11 -08:00 committed by GitHub
commit 311e632846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -17,9 +17,12 @@ limitations under the License.
package cmd
import (
"os"
"github.com/spf13/cobra"
"k8s.io/minikube/pkg/minikube/cluster"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/console"
"k8s.io/minikube/pkg/minikube/exit"
"k8s.io/minikube/pkg/minikube/machine"
)
@ -44,7 +47,10 @@ var sshCmd = &cobra.Command{
}
err = cluster.CreateSSHShell(api, args)
if err != nil {
exit.WithError("Error creating SSH shell", err)
// This is typically due to a non-zero exit code, so no need for flourish.
console.ErrLn("ssh: %v", err)
// It'd be nice if we could pass up the correct error code here :(
os.Exit(exit.Failure)
}
},
}