Skip to content

Commit

Permalink
Rephrase the adivce, use the runtime.GOOS to check whether it is .exe…
Browse files Browse the repository at this point in the history
… binary and modify the error name to address comments in pull request.
  • Loading branch information
hetong07 committed Feb 4, 2021
1 parent 289bf2f commit 547f506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func Execute() {
}
}
if !found {
exit.Message(reason.WrongBinary, "Cannot run Windows binary inside WSL, please download linux binary from https://minikube.sigs.k8s.io/docs/start/. Or you can use '--force' to force execution which would be at your own risk.")
exit.Message(reason.WrongBinaryWSL, "You are trying to run windows .exe binary inside WSL, for better integration please use Linux binary instead (Download at https://minikube.sigs.k8s.io/docs/start/.). Otherwise if you still want to do this, you can do it using --force"
}
}
for _, c := range RootCmd.Commands() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/reason/reason.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ var (

RsrcInsufficientStorage = Kind{ID: "RSRC_INSUFFICIENT_STORAGE", ExitCode: ExInsufficientStorage, Style: style.UnmetRequirement}

WrongBinary = Kind{ID: "WRONG_BINARY", ExitCode: ExHostError}
WrongBinaryWSL = Kind{ID: "WRONG_BINARY_WSL", ExitCode: ExHostError}
HostHomeMkdir = Kind{ID: "HOST_HOME_MKDIR", ExitCode: ExHostPermission}
HostHomeChown = Kind{ID: "HOST_HOME_CHOWN", ExitCode: ExHostPermission}
HostBrowser = Kind{ID: "HOST_BROWSER", ExitCode: ExHostError}
Expand Down

0 comments on commit 547f506

Please sign in to comment.