Skip to content

Commit

Permalink
Merge branch 'main' into moar-jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Jan 5, 2024
2 parents 6afe381 + 7833473 commit e221040
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bin/browsertime.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,17 @@ async function run(urls, options) {
const resultDirectory = relative(process.cwd(), storageManager.directory);

// check for errors
for (let eachResult of result) {
for (let errors of eachResult.errors) {
if (errors.length > 0) {
// If we have set the exit code in scripts, respect that
if (process.exitCode === undefined) {
for (let eachResult of result) {
if (eachResult.markedAsFailure === 1) {
process.exitCode = 1;
}
for (let errors of eachResult.errors) {
if (errors.length > 0) {
process.exitCode = 1;
}
}
}
}
log.info(`Wrote data to ${resultDirectory}`);
Expand Down

0 comments on commit e221040

Please sign in to comment.