Skip to content

Commit 6d8804e

Browse files
committed
Use the 'ExProgramUnsupported' as the error code for MK_WRONG_BINARY_WSL error.
1 parent 547f506 commit 6d8804e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmd/minikube/cmd/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func Execute() {
108108
}
109109
}
110110
if !found {
111-
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"
111+
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")
112112
}
113113
}
114114
for _, c := range RootCmd.Commands() {

pkg/minikube/reason/reason.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ var (
7575
Usage = Kind{ID: "MK_USAGE", ExitCode: ExProgramUsage}
7676
Interrupted = Kind{ID: "MK_INTERRUPTED", ExitCode: ExProgramConflict}
7777

78+
WrongBinaryWSL = Kind{ID: "MK_WRONG_BINARY_WSL", ExitCode: ExProgramUnsupported}
79+
7880
NewAPIClient = Kind{ID: "MK_NEW_APICLIENT", ExitCode: ExProgramError}
7981
InternalAddonEnable = Kind{ID: "MK_ADDON_ENABLE", ExitCode: ExProgramError}
8082
InternalAddConfig = Kind{ID: "MK_ADD_CONFIG", ExitCode: ExProgramError}
@@ -190,7 +192,6 @@ var (
190192

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

193-
WrongBinaryWSL = Kind{ID: "WRONG_BINARY_WSL", ExitCode: ExHostError}
194195
HostHomeMkdir = Kind{ID: "HOST_HOME_MKDIR", ExitCode: ExHostPermission}
195196
HostHomeChown = Kind{ID: "HOST_HOME_CHOWN", ExitCode: ExHostPermission}
196197
HostBrowser = Kind{ID: "HOST_BROWSER", ExitCode: ExHostError}

0 commit comments

Comments
 (0)