Skip to content

fix(cli): output error message on .fail() (fixes #29390)#29400

Closed
levgiorg wants to merge 1 commit into
anomalyco:devfrom
levgiorg:fix/issue-29390-fail-error-msg
Closed

fix(cli): output error message on .fail() (fixes #29390)#29400
levgiorg wants to merge 1 commit into
anomalyco:devfrom
levgiorg:fix/issue-29390-fail-error-msg

Conversation

@levgiorg
Copy link
Copy Markdown

When passing invalid arguments like --unknown-flag, the .fail() handler received the error message but never wrote it to stderr, making it impossible for the user to know what went wrong. This writes the error message to process.stderr before showing help or exiting.

Fixes #29390

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions
Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #29393: fix(opencode): show error message in CLI .fail() handler
#29393

Why it's related: This PR appears to address the same issue as the current PR (#29400). Both are fixing the CLI .fail() handler to output error messages, which matches the exact problem described in your PR (not showing error messages on invalid flags like --unknown-flag). This looks like a direct duplicate addressing issue #29390.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions github-actions Bot closed this May 26, 2026
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.

fix(opencode): CLI .fail() handler swallows error message

1 participant