Merge pull request #5143 from kevpar/fix-lookpath
Fix error checking when resolving shim binary path
This commit is contained in:
commit
a5d17eb507
@ -70,7 +70,7 @@ func Command(ctx context.Context, runtime, containerdAddress, containerdTTRPCAdd
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cmdPath == "" {
|
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, ok := lerr.(*exec.Error); ok {
|
||||||
if eerr.Err == exec.ErrNotFound {
|
if eerr.Err == exec.ErrNotFound {
|
||||||
// LookPath only finds current directory matches based on
|
// LookPath only finds current directory matches based on
|
||||||
|
Loading…
Reference in New Issue
Block a user