From 42ff994a098d528966409fa3478ebbe0c4ac310f Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Mon, 24 Feb 2014 20:52:55 -0800 Subject: [PATCH] Avoid returning twice on error in `files.run` --- tools/files.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/files.js b/tools/files.js index 51ac720dd5..71dd92956e 100644 --- a/tools/files.js +++ b/tools/files.js @@ -478,9 +478,11 @@ files.run = function (command /*, arguments */) { var child_process = require("child_process"); child_process.execFile( command, args, {}, function (error, stdout, stderr) { - if (! (error === null || error.code === 0)) + if (! (error === null || error.code === 0)) { future.return(null); - future.return(stdout); + } else { + future.return(stdout); + } }); return future.wait(); };