Skip to content

Commit

Permalink
Merge pull request #3703 from tstromberg/ssh-err
Browse files Browse the repository at this point in the history
Make non-zero ssh error codes less dramatic
  • Loading branch information
tstromberg authored Feb 16, 2019
2 parents 181446c + 19c2f5c commit 311e632
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/minikube/cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
}
},
}
Expand Down

0 comments on commit 311e632

Please sign in to comment.