Skip to content

Commit bbc679b

Browse files
committed
modify to exit.Unavailable and align the code
1 parent d40751f commit bbc679b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/minikube/cmd/dashboard.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,11 @@ var dashboardCmd = &cobra.Command{
7272
exit.WithError("Error getting client", err)
7373
}
7474

75-
_, err = api.Load(pkg_config.GetMachineName())
76-
if err != nil {
75+
if _, err = api.Load(pkg_config.GetMachineName()); err != nil {
7776
switch err := errors.Cause(err).(type) {
7877
case mcnerror.ErrHostDoesNotExist:
7978
console.OutStyle(console.Meh, "%q cluster does not exist", pkg_config.GetMachineName())
80-
os.Exit(0)
79+
os.Exit(exit.Unavailable)
8180
default:
8281
exit.WithError("Error getting cluster", err)
8382
}

0 commit comments

Comments
 (0)