{"record":{"id":"e457f07377f2d599","repo":"tinyhumansai/openhuman","slug":"unknown-option-arg-e457f0","errorCode":null,"errorMessage":"Unknown option: ${arg}","messagePattern":"Unknown option: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/release/generate-release-notes.mjs","lineNumber":85,"sourceCode":"    if (arg === '--help' || arg === '-h') {\n      return { ...options, help: true };\n    }\n    if (arg === '--from') {\n      options.from = readValue(arg);\n    } else if (arg === '--to') {\n      options.to = readValue(arg);\n    } else if (arg === '--repo') {\n      options.repo = readValue(arg);\n    } else if (arg === '--model') {\n      options.model = readValue(arg);\n    } else if (arg === '--output' || arg === '-o') {\n      options.output = readValue(arg);\n    } else if (arg === '--no-ai') {\n      options.noAi = true;\n    } else if (arg === '--dry-run') {\n      options.dryRun = true;\n    } else {\n      throw new Error(`Unknown option: ${arg}`);\n    }\n  }\n\n  return options;\n}\n\nfunction runGit(args, options = {}) {\n  return execFileSync('git', args, {\n    encoding: 'utf8',\n    stdio: ['ignore', 'pipe', options.allowFailure ? 'pipe' : 'inherit'],\n  }).trim();\n}\n\nfunction runGh(args, options = {}) {\n  return execFileSync('gh', args, {\n    encoding: 'utf8',\n    stdio: ['ignore', 'pipe', options.allowFailure ? 'pipe' : 'inherit'],\n  }).trim();","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/scripts/release/generate-release-notes.mjs#L67-L103","documentation":"The release-notes script accepts exactly: --help/-h, --from <ref>, --to <ref>, --repo <owner/repo>, --model <name>, --output/-o <file>, --no-ai, and --dry-run. The parser's final else branch throws `Unknown option` for any other token, so a typo or an invented flag aborts before any git/gh/network work happens.","triggerScenarios":"`--outpt notes.md` (typo for --output), `--verbose`, `--yes`; also an option value that starts with '-' can be misread as the next option and land here (see error 276).","commonSituations":"Typos in long option names; flags copied from a different changelog tool; assuming a global --verbose exists.","solutions":["Run with `--help` and copy the supported option list verbatim","Fix the typo — the commonest are --output (not --out/--outpt) and --dry-run (not --dryrun)","Drop flags that don't exist; behavior defaults are documented in --help"],"exampleFix":"# before\nnode scripts/release/generate-release-notes.mjs --outpt notes.md\n\n# after\nnode scripts/release/generate-release-notes.mjs --output notes.md","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--help', '-h', '--from', '--to', '--repo', '--model', '--output', '-o', '--no-ai', '--dry-run']);\nconst bad = argv.filter(a => a.startsWith('-') && !KNOWN.has(a));\nif (bad.length) { console.error(`Unknown options: ${bad.join(', ')}`); process.exit(2); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate the command from `--help` output rather than memory when automating release notes","Beware cascades: a missing value (error 276) can make the NEXT token look like an unknown option — fix the first error, re-run"],"tags":["cli","validation","release"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}