in features/support/steps.js [35:56]
function fastrun(args, tmpDirectoryPath, callback) {
var curdir = process.cwd();
process.chdir(tmpDirectoryPath);
var promise;
try {
promise = main.main(CommandLine.parseArgs(args), true);
} catch (err) {
process.chdir(curdir);
callback('error running subprocess: ' + err + '\n' + err.stack);
return;
}
// If you try to delete this, you'll get lots of errors
// about missing output files. Need to sequence inspecting the
// output of the tool *after* the promises finish resolving! (and
// yes, it did take me way too long to realize I needed to do this.)
if (promise) {
Promise.then(() => {
process.chdir(curdir);
callback();
}, promise);
}
}