tinyhumansai/openhuman · error · Error
Unknown option: ${arg}
Error message
Unknown option: ${arg} What it means
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.
Source
Thrown at scripts/release/generate-release-notes.mjs:85
if (arg === '--help' || arg === '-h') {
return { ...options, help: true };
}
if (arg === '--from') {
options.from = readValue(arg);
} else if (arg === '--to') {
options.to = readValue(arg);
} else if (arg === '--repo') {
options.repo = readValue(arg);
} else if (arg === '--model') {
options.model = readValue(arg);
} else if (arg === '--output' || arg === '-o') {
options.output = readValue(arg);
} else if (arg === '--no-ai') {
options.noAi = true;
} else if (arg === '--dry-run') {
options.dryRun = true;
} else {
throw new Error(`Unknown option: ${arg}`);
}
}
return options;
}
function runGit(args, options = {}) {
return execFileSync('git', args, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', options.allowFailure ? 'pipe' : 'inherit'],
}).trim();
}
function runGh(args, options = {}) {
return execFileSync('gh', args, {
encoding: 'utf8',
stdio: ['ignore', 'pipe', options.allowFailure ? 'pipe' : 'inherit'],
}).trim();View on GitHub (pinned to a221052e0d)
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
Example fix
# before node scripts/release/generate-release-notes.mjs --outpt notes.md # after node scripts/release/generate-release-notes.mjs --output notes.md
Defensive patterns
Strategy: validation
Validate before calling
const KNOWN = new Set(['--help', '-h', '--from', '--to', '--repo', '--model', '--output', '-o', '--no-ai', '--dry-run']);
const bad = argv.filter(a => a.startsWith('-') && !KNOWN.has(a));
if (bad.length) { console.error(`Unknown options: ${bad.join(', ')}`); process.exit(2); } Prevention
- 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
When it happens
Trigger: `--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).
Common situations: Typos in long option names; flags copied from a different changelog tool; assuming a global --verbose exists.
Related errors
- ${name} requires a value
- Failed to parse service CLI output as JSON: parsed value doe
- paths must be repo-relative, not absolute (got "${p}")
- must be an array
- ${label} must be a positive integer
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/e457f07377f2d599.
Report an issue: GitHub.