diff --git a/local-cli/dependencies/dependencies.js b/local-cli/dependencies/dependencies.js index 54c1b004f..6a8fbb310 100644 --- a/local-cli/dependencies/dependencies.js +++ b/local-cli/dependencies/dependencies.js @@ -104,7 +104,9 @@ function _dependencies(argv, config, resolve, reject) { outStream.write(modulePath + '\n'); } }); - writeToFile && outStream.end(); + return writeToFile + ? Promise.denodeify(outStream.end).bind(outStream)() + : Promise.resolve(); // log('Wrote dependencies to output file'); }); }));