Skip to content

Commit c9afc42

Browse files
committed
Fix error checking when resolving shim binary path
Previously a typo was introduced that caused the wrong error to be checked against when calling exec.LookPath. This had the effect that containerd would never locate the shim binary if it was in the same directory as containerd's binary, but not in PATH. Signed-off-by: Kevin Parsons <[email protected]>
1 parent 6d68490 commit c9afc42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runtime/v2/shim/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func Command(ctx context.Context, runtime, containerdAddress, containerdTTRPCAdd
7070
}
7171

7272
if cmdPath == "" {
73-
if cmdPath, lerr = exec.LookPath(name); err != nil {
73+
if cmdPath, lerr = exec.LookPath(name); lerr != nil {
7474
if eerr, ok := lerr.(*exec.Error); ok {
7575
if eerr.Err == exec.ErrNotFound {
7676
// LookPath only finds current directory matches based on

0 commit comments

Comments
 (0)