From 9ba0d905b0da23d540c23b073d794989612d4664 Mon Sep 17 00:00:00 2001 From: Alexis Campailla Date: Wed, 4 Dec 2013 11:04:47 -0800 Subject: [PATCH] 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. --- lib/child_process.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/child_process.js b/lib/child_process.js index 96193a8..75a637e 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -952,10 +952,7 @@ ChildProcess.prototype.spawn = function(options) { var err = this._handle.spawn(options); - if (!constants) - constants = process.binding('constants'); - - if (-err == constants.ENOENT) { + if (err == uv.UV_ENOENT) { process.nextTick(function() { self._handle.onexit(err); }); -- 2.7.4