diff --git a/lib/index.js b/lib/index.js index 2de436c..2fd358b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,4 +1,4 @@ -const isexe = require('isexe') +const { isexe, sync: isexeSync } = require('isexe') const { join, delimiter, sep, posix } = require('path') const isWindows = process.platform === 'win32' @@ -86,7 +86,7 @@ const whichSync = (cmd, opt = {}) => { for (const ext of pathExt) { const withExt = p + ext - const is = isexe.sync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) + const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) if (is) { if (!opt.all) { return withExt