Skip to content

fix double help printing#1580

Merged
adamdotdevin merged 1 commit into
anomalyco:devfrom
rekram1-node:fix-double-help
Aug 4, 2025
Merged

fix double help printing#1580
adamdotdevin merged 1 commit into
anomalyco:devfrom
rekram1-node:fix-double-help

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

fixes: #149

Now help messages won't show twice

Uses process.exit(1) as outlined in yargs docs:

import yargs from 'yargs'
const argv = yargs(process.argv.slice(2))
  .fail(function (msg, err, yargs) {
    if (err) throw err // preserve stack
    console.error('You broke it!')
    console.error(msg)
    console.error('You should be doing', yargs.help())
    process.exit(1)
  })
  .parse()

@adamdotdevin
adamdotdevin merged commit ae78ec7 into anomalyco:dev Aug 4, 2025
1 check passed
achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 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.

opencode auth --foo prints help text twice

2 participants