Skip to content

Commit

Permalink
approvalsGH-125 set exit code when failing postRunCleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
davidalpert committed Oct 13, 2021
1 parent c620b85 commit 8baee0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/postRunCleanup.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = function (config, approvedFilesMap) {
}); // only pull the ones that aren't already in the 'normalizedApprovedFilePaths'

if (staleApprovals.length) {
process.exitCode = 1 // make sure the process reports this failure
throw new Error('ERROR: Found stale approvals files: \n - ' + staleApprovals.join('\n - ') + '\n');
}
}
Expand Down

0 comments on commit 8baee0b

Please sign in to comment.