From c1ea5744a0057150628e3c4f38274e546b74f441 Mon Sep 17 00:00:00 2001 From: Lennart Kats Date: Wed, 4 Nov 2015 11:19:43 +0000 Subject: [PATCH] Cleanup old ENOENT approach --- node_modules/vfs-child/parent.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/node_modules/vfs-child/parent.js b/node_modules/vfs-child/parent.js index f98d320c..2c1dc7a9 100644 --- a/node_modules/vfs-child/parent.js +++ b/node_modules/vfs-child/parent.js @@ -26,7 +26,6 @@ function Parent(fsOptions) { function connect(callback) { var _self = this; try { - // Check if file exists first; spawn's ENOENT may arrive after other errors if (!fs.existsSync(nodeBin[0])) return tryNext(new Error("Couldn't find valid node binary")); child = spawn(nodeBin[0], args, options).on("error", tryNext); @@ -54,12 +53,7 @@ function Parent(fsOptions) { child.removeListener("error", done); child.on("error", function ignore(err) {}); child = null; - - if (err && err.code == "ENOENT") { - tryNext(err); - } else { - callback(err, vfs); - } + callback(err, vfs); } }