Skip to content

Commit

Permalink
fix: fix worker threads in Node >=11.10.0 (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Apr 4, 2020
1 parent c76e7bb commit 6c5b4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/resolveCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
const cwd = process.cwd();
const hasCustomCwd = parsed.options.cwd != null;
// Worker threads do not have process.chdir()
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;

// If a custom `cwd` was specified, we need to change the process cwd
// because `which` will do stat calls but does not support a custom cwd
Expand Down

0 comments on commit 6c5b4f0

Please sign in to comment.