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

suppress error msg incase of no cluster existence #17713

Merged
merged 3 commits into from
Mar 21, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use config.IsNotExist
  • Loading branch information
spowelljr committed Mar 20, 2024
commit 9799e5f0886d75bdfaea5089e108d01ff7fa9056
2 changes: 1 addition & 1 deletion pkg/minikube/sshagent/sshagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func isRunning(cc *config.ClusterConfig) (bool, error) {
func Stop(profile string) error {
cc, err := config.Load(profile)
if err != nil {
if strings.Contains(fmt.Sprint(err), fmt.Sprintf("cluster %q does not exist", profile)) {
if config.IsNotExist(err) {
return nil
spowelljr marked this conversation as resolved.
Show resolved Hide resolved
}
return fmt.Errorf("failed loading config: %v", err)
Expand Down
Loading