Skip to content

Fix exit codes for duplicate automation scripts#25309

Open
Atman36 wants to merge 1 commit intoanthropics:mainfrom
Atman36:codex/fix-duplicate-scripts-exit-codes
Open

Fix exit codes for duplicate automation scripts#25309
Atman36 wants to merge 1 commit intoanthropics:mainfrom
Atman36:codex/fix-duplicate-scripts-exit-codes

Conversation

@Atman36
Copy link

@Atman36 Atman36 commented Feb 12, 2026

Problem

The duplicate automation scripts currently exit with code 0 even when fatal errors occur (e.g., missing GITHUB_TOKEN). This masks failures in CI/CD pipelines and violates the fail-fast principle.

Solution

Updated top-level .catch() handlers in both scripts to set process.exitCode = 1 on errors while preserving error logging.

Verification

bun run scripts/auto-close-duplicates.ts; echo $?
# Before: prints error, exits 0
# After: prints error, exits 1

Success path behavior unchanged—only failure signaling is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant