Merge pull request #3703 from tstromberg/ssh-err
Make non-zero ssh error codes less dramaticpull/3707/head
commit
311e632846
|
@ -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)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue