From 4cf467cecc4d49355139c24bc1420f3978a367dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Fri, 13 Jan 2023 17:40:31 +0100 Subject: [PATCH] Use absolute path when calling crictl version Some legacy systems don't have /usr/local/bin in secure_path So they are not able to find any locally installed tools... --- pkg/minikube/node/start.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index 6b36d7da81..0ead64af99 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -471,8 +471,15 @@ func waitForCRIVersion(runner cruntime.CommandRunner, socket string, wait int, i klog.Infof("Will wait %ds for crictl version", wait) + cmd := exec.Command("which", "crictl") + rr, err := runner.RunCmd(cmd) + if err != nil { + return err + } + crictl := strings.TrimSuffix(rr.Stdout.String(), "\n") + chkInfo := func() error { - args := []string{"crictl", "version"} + args := []string{crictl, "version"} cmd := exec.Command("sudo", args...) rr, err := runner.RunCmd(cmd) if err != nil && !os.IsNotExist(err) {