Skip to content

Commit

Permalink
Catching exit code from browsertime and exiting if non-zero is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
beenanner committed Oct 31, 2016
1 parent 6248184 commit 1dba9d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/plugins/browsertime/analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ module.exports = {
let engine = new browsertime.Engine(btOptions);
log.info('Starting %s for analysing %s %s time(s)', btOptions.browser, url, btOptions.iterations);
return engine.start()
.then(() => engine.run(url, scriptsByCategory))
.then((result,error) => engine.run(url, scriptsByCategory))
.catch((error) => {
process.exitCode = 1;
process.exit();
})
.finally(() => engine.stop())
}
};

0 comments on commit 1dba9d2

Please sign in to comment.