From 19c2f5cb446671cdc5e1ba56de613c04da67014b Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Sat, 16 Feb 2019 08:36:53 -0800 Subject: [PATCH] Make non-zero ssh error codes less dramatic --- cmd/minikube/cmd/ssh.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/ssh.go b/cmd/minikube/cmd/ssh.go index b20811b84f36..ab79e950dd54 100644 --- a/cmd/minikube/cmd/ssh.go +++ b/cmd/minikube/cmd/ssh.go @@ -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) } }, }