Skip to content

Commit

Permalink
fix: speed up which lookups on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr authored Dec 17, 2023
1 parent d3ba687 commit 822d39b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const spawnWithShell = (cmd, args, opts, extra) => {
let pathToInitial
try {
pathToInitial = which.sync(initialCmd, {
path: (options.env && options.env.PATH) || process.env.PATH,
path: (options.env && (options.env.PATH || options.env.Path)) || process.env.PATH,
pathext: (options.env && options.env.PATHEXT) || process.env.PATHEXT,
}).toLowerCase()
} catch (err) {
Expand Down

0 comments on commit 822d39b

Please sign in to comment.