Skip to content

Commit

Permalink
Merge pull request #5143 from kevpar/fix-lookpath
Browse files Browse the repository at this point in the history
Fix error checking when resolving shim binary path
  • Loading branch information
fuweid committed Mar 9, 2021
2 parents 9ec2778 + c9afc42 commit a5d17eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/v2/shim/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a5d17eb

Please sign in to comment.