From 33a2efeb4504b50a61118bf980d6046aa5ca8207 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Thu, 9 May 2024 12:27:34 +0100 Subject: [PATCH] sanitycheck: promote warnings to errors in CI --- bin/sanitycheck.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/sanitycheck.js b/bin/sanitycheck.js index 3bb9a822a..6264bc23a 100755 --- a/bin/sanitycheck.js +++ b/bin/sanitycheck.js @@ -400,4 +400,7 @@ console.log(`${errorCount} errors, ${warningCount} warnings`); console.log("=================================="); if (errorCount) { process.exit(1); +} else if ("CI" in process.env && warningCount) { + console.log("Running in CI, raising an error from warnings"); + process.exit(1); }