Skip to content

Fix: boa_cli returns non-zero exit code on uncaught exceptions#5345

Closed
Pantkartik wants to merge 1 commit into
boa-dev:mainfrom
Pantkartik:main
Closed

Fix: boa_cli returns non-zero exit code on uncaught exceptions#5345
Pantkartik wants to merge 1 commit into
boa-dev:mainfrom
Pantkartik:main

Conversation

@Pantkartik

Copy link
Copy Markdown

Description: Currently, the boa CLI returns an exit code of 0 even when a script fails with an uncaught runtime exception. This PR modifies evaluate_file and evaluate_expr in cli/src/main.rs to propagate errors back to the main function, ensuring a non-zero exit code is returned on failure.

Fixes: #4962

Verification:

Verified that boa returns exit code 1 for scripts with uncaught errors.
Verified that successful scripts still return exit code 0.

@Pantkartik Pantkartik requested a review from a team as a code owner April 22, 2026 16:49
@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-CLI Issues and PRs related to the Boa command line interface. and removed Waiting On Review Waiting on reviews from the maintainers labels Apr 22, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Apr 22, 2026
@jedel1043

Copy link
Copy Markdown
Member

Duplicate of #4964

@jedel1043 jedel1043 marked this as a duplicate of #4964 Apr 22, 2026
@jedel1043 jedel1043 closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-CLI Issues and PRs related to the Boa command line interface.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

boa_cli exit code 0 on uncaught runtime exceptions

2 participants