fix(cli): output error message on .fail() (fixes #29390)#29400
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #29393: Why it's related: This PR appears to address the same issue as the current PR (#29400). Both are fixing the CLI |
|
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. |
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 toprocess.stderrbefore showing help or exiting.Fixes #29390