From fb2c3ed4b7539297d8dbe395d2c5cb15c7eef2af Mon Sep 17 00:00:00 2001 From: loftkun Date: Mon, 6 Apr 2020 23:45:54 +0900 Subject: [PATCH] fix validateDriver() to exit when detects an error --- cmd/minikube/cmd/start.go | 4 ++++ translations/de.json | 1 + translations/es.json | 1 + translations/fr.json | 1 + translations/ja.json | 1 + translations/ko.json | 1 + translations/pl.json | 1 + translations/zh-CN.json | 1 + 8 files changed, 11 insertions(+) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index 0a42f5e979..6ca754d823 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -679,6 +679,10 @@ func validateDriver(ds registry.DriverState, existing *config.ClusterConfig) { } exit.WithCodeT(exit.Unavailable, "{{.driver}} does not appear to be installed", out.V{"driver": name}) } + + if !viper.GetBool(force) { + exit.WithCodeT(exit.Unavailable, "Failed to validate '{{.driver}}' driver", out.V{"driver": name}) + } } } diff --git a/translations/de.json b/translations/de.json index 4dafa749a1..721744768f 100644 --- a/translations/de.json +++ b/translations/de.json @@ -184,6 +184,7 @@ "Failed to stop node {{.name}}": "", "Failed to update cluster": "", "Failed to update config": "", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "", "File permissions used for the mount": "", "Filter to use only VM Drivers": "", diff --git a/translations/es.json b/translations/es.json index 76827505a8..9a94511d4d 100644 --- a/translations/es.json +++ b/translations/es.json @@ -185,6 +185,7 @@ "Failed to stop node {{.name}}": "", "Failed to update cluster": "", "Failed to update config": "", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "", "File permissions used for the mount": "", "Filter to use only VM Drivers": "", diff --git a/translations/fr.json b/translations/fr.json index 573981e1d2..3f1f53d0e5 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -182,6 +182,7 @@ "Failed to stop node {{.name}}": "", "Failed to update cluster": "", "Failed to update config": "", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "", "File permissions used for the mount": "", "Filter to use only VM Drivers": "", diff --git a/translations/ja.json b/translations/ja.json index c2346cd739..84f91a6f24 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -193,6 +193,7 @@ "Failed to stop node {{.name}}": "", "Failed to update cluster": "", "Failed to update config": "", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "", "File permissions used for the mount": "", "Filter to use only VM Drivers": "", diff --git a/translations/ko.json b/translations/ko.json index 8c20c92de6..f246b3b6d9 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -197,6 +197,7 @@ "Failed to stop node {{.name}}": "노드 {{.name}} 중지에 실패하였습니다", "Failed to update cluster": "클러스터를 수정하는 데 실패하였습니다", "Failed to update config": "컨피그를 수정하는 데 실패하였습니다", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "마운트 해제에 실패하였습니다: {{.error}}", "File permissions used for the mount": "", "Filter to use only VM Drivers": "", diff --git a/translations/pl.json b/translations/pl.json index 7bf259a38a..4a2543df8a 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -190,6 +190,7 @@ "Failed to setup kubeconfig": "Konfiguracja kubeconfig nie powiodła się", "Failed to stop node {{.name}}": "", "Failed to update cluster": "Aktualizacja klastra nie powiodła się", + "Failed to validate '{{.driver}}' driver": "", "Failed to update config": "Aktualizacja konfiguracji nie powiodła się", "Failed unmount: {{.error}}": "", "File permissions used for the mount": "", diff --git a/translations/zh-CN.json b/translations/zh-CN.json index 1174030a21..31a90e3542 100644 --- a/translations/zh-CN.json +++ b/translations/zh-CN.json @@ -240,6 +240,7 @@ "Failed to stop node {{.name}}": "", "Failed to update cluster": "更新 cluster 失败", "Failed to update config": "更新 config 失败", + "Failed to validate '{{.driver}}' driver": "", "Failed unmount: {{.error}}": "unmount 失败:{{.error}}", "File permissions used for the mount": "用于 mount 的文件权限", "Filter to use only VM Drivers": "",