Skip to content

Commit

Permalink
Merge pull request kubernetes#17713 from tarishij17/master
Browse files Browse the repository at this point in the history
suppress error msg incase of no cluster existence
  • Loading branch information
spowelljr authored Mar 21, 2024
2 parents 9796828 + e2fcc47 commit afaf858
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ var hostAndDirsDeleter = func(api libmachine.API, cc *config.ClusterConfig, prof
if err := killMountProcess(); err != nil {
out.FailureT("Failed to kill mount process: {{.error}}", out.V{"error": err})
}
if err := sshagent.Stop(profileName); err != nil {
if err := sshagent.Stop(profileName); err != nil && !config.IsNotExist(err) {
out.FailureT("Failed to stop ssh-agent process: {{.error}}", out.V{"error": err})
}

Expand Down
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 {
return fmt.Errorf("failed loading config: %v", err)
return err
}
running, err := isRunning(cc)
if err != nil {
Expand Down

0 comments on commit afaf858

Please sign in to comment.