Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: break down usage for no profile found #10800

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion pkg/minikube/reason/reason.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down