From 8baee0beb7fb75a6614a5cfbf6de8b39939a0cb9 Mon Sep 17 00:00:00 2001 From: David Alpert Date: Wed, 13 Oct 2021 10:56:29 -0500 Subject: [PATCH] GH-125 set exit code when failing postRunCleanup Closes #125 --- lib/postRunCleanup.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/postRunCleanup.js b/lib/postRunCleanup.js index 5774eeca..38d456f7 100644 --- a/lib/postRunCleanup.js +++ b/lib/postRunCleanup.js @@ -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'); } }