Merge pull request #2961 from jterry75/fix_typo_path

Fix bug in shim path lookup
This commit is contained in:
Michael Crosby 2019-01-30 11:11:55 -05:00 committed by GitHub
commit 118d321cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,9 +71,9 @@ func Command(ctx context.Context, runtime, containerdAddress, path string, cmdAr
// execute the shim found there. // execute the shim found there.
testPath := filepath.Join(filepath.Dir(self), name) testPath := filepath.Join(filepath.Dir(self), name)
if _, serr := os.Stat(testPath); serr == nil { if _, serr := os.Stat(testPath); serr == nil {
path = testPath cmdPath = testPath
} }
if path == "" { if cmdPath == "" {
return nil, errors.Wrapf(os.ErrNotExist, "runtime %q binary not installed %q", runtime, name) return nil, errors.Wrapf(os.ErrNotExist, "runtime %q binary not installed %q", runtime, name)
} }
} }