diff --git a/lib/plugins/browsertime/analyzer.js b/lib/plugins/browsertime/analyzer.js index 92838198c1..a83f9cbe15 100644 --- a/lib/plugins/browsertime/analyzer.js +++ b/lib/plugins/browsertime/analyzer.js @@ -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()) } };