Skip to content

Commit ae7cb58

Browse files
authored
Merge pull request #15642 from afbjorklund/crictl-version-path
Use absolute path when calling crictl version
2 parents 881d72b + 4cf467c commit ae7cb58

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/minikube/node/start.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,15 @@ func waitForCRIVersion(runner cruntime.CommandRunner, socket string, wait int, i
471471

472472
klog.Infof("Will wait %ds for crictl version", wait)
473473

474+
cmd := exec.Command("which", "crictl")
475+
rr, err := runner.RunCmd(cmd)
476+
if err != nil {
477+
return err
478+
}
479+
crictl := strings.TrimSuffix(rr.Stdout.String(), "\n")
480+
474481
chkInfo := func() error {
475-
args := []string{"crictl", "version"}
482+
args := []string{crictl, "version"}
476483
cmd := exec.Command("sudo", args...)
477484
rr, err := runner.RunCmd(cmd)
478485
if err != nil && !os.IsNotExist(err) {

0 commit comments

Comments
 (0)