Skip to content

Commit 2ff5994

Browse files
committed
chore(scripts/ci-validate): catch unhandled rejections from main
Defensive. main() already wraps its body in try/catch, so a rejection can only escape if the catch handler itself throws. Cheap to harden against future edits that make that possible.
1 parent 6bb8fdf commit 2ff5994

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

scripts/ci-validate.mts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,8 @@ async function main(): Promise<void> {
8282
}
8383
}
8484

85-
main()
85+
main().catch((e: unknown) => {
86+
const message = e instanceof Error ? e.message : String(e)
87+
logger.error(`CI validation crashed: ${message}`)
88+
process.exitCode = 1
89+
})

0 commit comments

Comments
 (0)