Skip to content

Commit 9799e5f

Browse files
committed
use config.IsNotExist
1 parent 59ef76b commit 9799e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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-
if strings.Contains(fmt.Sprint(err), fmt.Sprintf("cluster %q does not exist", profile)) {
109+
if config.IsNotExist(err) {
110110
return nil
111111
}
112112
return fmt.Errorf("failed loading config: %v", err)

0 commit comments

Comments
 (0)