fix: stop silently swallowing errors in runCommand#130
Merged
Conversation
Move container.resolve() inside try/catch so resolution failures are caught. Ensure process.exitCode is always set to 1 on any failure, and log container resolution errors to stderr. BaseCommand.run() already handles command errors via handleError(), so we only need to catch what falls outside of that. Closes #126 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
container.resolve()inside the try/catch so container resolution failures (e.g., unregistered service tokens) are caught instead of crashingprocess.exitCodeis always set to1on any failure — previously, errors caught beforeBaseCommand.handleError()ran would leave exit code at 0BaseCommand.run()already handles command-level errors viahandleError()(outputs error + sets exit code), so the catch block only needs to cover what falls outside that pathCloses #126
Test plan
bun test— 417 tests passbun run lint— passesbun run format:check— passes🤖 Generated with Claude Code