diff --git a/runtime/v2/shim/util.go b/runtime/v2/shim/util.go index 59f9ff21c..52bfaa9ce 100644 --- a/runtime/v2/shim/util.go +++ b/runtime/v2/shim/util.go @@ -70,7 +70,7 @@ func Command(ctx context.Context, runtime, containerdAddress, containerdTTRPCAdd } if cmdPath == "" { - if cmdPath, lerr = exec.LookPath(name); err != nil { + if cmdPath, lerr = exec.LookPath(name); lerr != nil { if eerr, ok := lerr.(*exec.Error); ok { if eerr.Err == exec.ErrNotFound { // LookPath only finds current directory matches based on