Merge pull request #10800 from medyagh/usage_err_break

ui: break down usage for no profile found
pull/10810/head
Medya Ghazizadeh 2021-03-12 14:09:21 -08:00 committed by GitHub
commit b6c41014a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -77,7 +77,7 @@ func printProfilesTable() {
}
if len(validProfiles) == 0 {
exit.Message(reason.Usage, "No minikube profile was found. You can create one using `minikube start`.")
exit.Message(reason.UsageNoProfileRunning, "No minikube profile was found. ")
}
updateProfilesStatus(validProfiles)

View File

@ -72,7 +72,12 @@ func (k *Kind) IssueURLs() []string {
// Sections are ordered roughly by stack dependencies
var (
Usage = Kind{ID: "MK_USAGE", ExitCode: ExProgramUsage}
Usage = Kind{ID: "MK_USAGE", ExitCode: ExProgramUsage}
UsageNoProfileRunning = Kind{ID: "MK_USAGE_NO_PROFILE", ExitCode: ExProgramUsage,
Advice: `You can create one using 'minikube start'.
`,
Style: style.Caching,
}
Interrupted = Kind{ID: "MK_INTERRUPTED", ExitCode: ExProgramConflict}
WrongBinaryWSL = Kind{ID: "MK_WRONG_BINARY_WSL", ExitCode: ExProgramUnsupported}