format error message EVEN BETTER

pull/13124/head
Sharif Elgamal 2021-12-07 16:27:50 -08:00
parent b9e9df130a
commit da7020aa9c
2 changed files with 3 additions and 1 deletions

View File

@ -1286,7 +1286,7 @@ func validateRuntime(rtime string) error {
}
if (rtime == "crio" || rtime == "cri-o") && strings.HasPrefix(runtime.GOARCH, "ppc64") {
return errors.New("The CRI-O runtime is not compatible with the ppc architecture.")
out.Error(reason.RuntimeIncompat, "The {{.runtime}} runtime is not compatible with the {{.arch}} architecture.", out.V{"runtime": rtime, "arch": runtime.GOARCH})
}
if !validRuntime {

View File

@ -402,6 +402,8 @@ var (
RuntimeEnable = Kind{ID: "RUNTIME_ENABLE", ExitCode: ExRuntimeError}
// minikube failed to cache images for the current container runtime
RuntimeCache = Kind{ID: "RUNTIME_CACHE", ExitCode: ExRuntimeError}
// the chosen container runtime doesn't work with the system architecture
RuntimeIncompat = Kind{ID: "RUNTIME_INCOMPAT", ExitCode: ExRuntimeError}
// service check timed out while starting minikube dashboard
SvcCheckTimeout = Kind{ID: "SVC_CHECK_TIMEOUT", ExitCode: ExSvcTimeout}