Skip to content

Commit aafebbf

Browse files
ashleyshawCopilot
andauthored
Update metrics/frontmatter-metrics.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
1 parent d045177 commit aafebbf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

metrics/frontmatter-metrics.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,10 @@ async function main() {
243243

244244
if (fails.length) {
245245
console.error("Thresholds failed:", fails.join(", "));
246-
// Do not fail the job by default; uncomment the next line once calibrated:
247-
// process.exit(1);
246+
// Fail the job if configured to do so (set thresholds.failOnError: true in metrics.config.json)
247+
if (t.failOnError) {
248+
process.exit(1);
249+
}
248250
}
249251
}
250252

0 commit comments

Comments
 (0)