Cleanup old ENOENT approach

pull/223/head
Lennart Kats 2015-11-04 11:19:43 +00:00
rodzic 4d49d34712
commit c1ea5744a0
1 zmienionych plików z 1 dodań i 7 usunięć

8
node_modules/vfs-child/parent.js wygenerowano vendored
Wyświetl plik

@ -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);
}
}