Skip to content

Commit 6c5b4f0

Browse files
authored
fix: fix worker threads in Node >=11.10.0 (#132)
1 parent c76e7bb commit 6c5b4f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/resolveCommand.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
88
const cwd = process.cwd();
99
const hasCustomCwd = parsed.options.cwd != null;
1010
// Worker threads do not have process.chdir()
11-
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined;
11+
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
1212

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

0 commit comments

Comments
 (0)