cross-spawn
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [7.0.1](https://github.com/moxystudio/node-cross-spawn/compare/v7.0.0...v7.0.1) (2019-10-07) | ||
### Bug Fixes | ||
* **core:** support worker threads ([#127](https://github.com/moxystudio/node-cross-spawn/issues/127)) ([cfd49c9](https://github.com/moxystudio/node-cross-spawn/commit/cfd49c9)) | ||
## [7.0.0](https://github.com/moxystudio/node-cross-spawn/compare/v6.0.5...v7.0.0) (2019-09-03) | ||
@@ -7,0 +14,0 @@ |
@@ -10,6 +10,8 @@ 'use strict'; | ||
const hasCustomCwd = parsed.options.cwd != null; | ||
// Worker threads do not have process.chdir() | ||
const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined; | ||
// 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 | ||
if (hasCustomCwd) { | ||
if (shouldSwitchCwd) { | ||
try { | ||
@@ -32,3 +34,5 @@ process.chdir(parsed.options.cwd); | ||
} finally { | ||
process.chdir(cwd); | ||
if (shouldSwitchCwd) { | ||
process.chdir(cwd); | ||
} | ||
} | ||
@@ -35,0 +39,0 @@ |
{ | ||
"name": "cross-spawn", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Cross platform child_process#spawn and child_process#spawnSync", | ||
@@ -56,4 +56,4 @@ "keywords": [ | ||
"path-key": "^3.1.0", | ||
"shebang-command": "^1.2.0", | ||
"which": "^1.2.9" | ||
"shebang-command": "^2.0.0", | ||
"which": "^2.0.1" | ||
}, | ||
@@ -60,0 +60,0 @@ "devDependencies": { |
20512
236
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedwhich@1.3.1(transitive)
Updatedshebang-command@^2.0.0
Updatedwhich@^2.0.1