lib: child_process spawn handle ENOENT correctly
child_process spawn wasn't handlig ENOENT correctly on Windows. This is half a fix for test-child-process-cwd.js. The other half is going into libuv.
This commit is contained in:
parent
4bd5f35889
commit
9ba0d905b0
@ -952,10 +952,7 @@ ChildProcess.prototype.spawn = function(options) {
|
|||||||
|
|
||||||
var err = this._handle.spawn(options);
|
var err = this._handle.spawn(options);
|
||||||
|
|
||||||
if (!constants)
|
if (err == uv.UV_ENOENT) {
|
||||||
constants = process.binding('constants');
|
|
||||||
|
|
||||||
if (-err == constants.ENOENT) {
|
|
||||||
process.nextTick(function() {
|
process.nextTick(function() {
|
||||||
self._handle.onexit(err);
|
self._handle.onexit(err);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user