Skip to content

Commit afaf858

Browse files
authored
Merge pull request #17713 from tarishij17/master
suppress error msg incase of no cluster existence
2 parents 9796828 + e2fcc47 commit afaf858

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/minikube/cmd/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ var hostAndDirsDeleter = func(api libmachine.API, cc *config.ClusterConfig, prof
9494
if err := killMountProcess(); err != nil {
9595
out.FailureT("Failed to kill mount process: {{.error}}", out.V{"error": err})
9696
}
97-
if err := sshagent.Stop(profileName); err != nil {
97+
if err := sshagent.Stop(profileName); err != nil && !config.IsNotExist(err) {
9898
out.FailureT("Failed to stop ssh-agent process: {{.error}}", out.V{"error": err})
9999
}
100100

pkg/minikube/sshagent/sshagent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func isRunning(cc *config.ClusterConfig) (bool, error) {
106106
func Stop(profile string) error {
107107
cc, err := config.Load(profile)
108108
if err != nil {
109-
return fmt.Errorf("failed loading config: %v", err)
109+
return err
110110
}
111111
running, err := isRunning(cc)
112112
if err != nil {

0 commit comments

Comments
 (0)