diff --git a/cmd/minikube/cmd/delete.go b/cmd/minikube/cmd/delete.go index b881c6d84d4f..20ccbd1c0c85 100644 --- a/cmd/minikube/cmd/delete.go +++ b/cmd/minikube/cmd/delete.go @@ -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}) } diff --git a/pkg/minikube/sshagent/sshagent.go b/pkg/minikube/sshagent/sshagent.go index dc066907c339..73ac75876373 100644 --- a/pkg/minikube/sshagent/sshagent.go +++ b/pkg/minikube/sshagent/sshagent.go @@ -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 {