Make non-zero ssh error codes less dramatic

pull/3703/head
Thomas Stromberg 2019-02-16 08:36:53 -08:00
parent e801b47918
commit 19c2f5cb44
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)
}
},
}