Skip to content

Map Commander parse errors to exit code 2#19

Merged
paulius-krutkis-dcd merged 1 commit into
mainfrom
map-commander-errors
Jun 9, 2026
Merged

Map Commander parse errors to exit code 2#19
paulius-krutkis-dcd merged 1 commit into
mainfrom
map-commander-errors

Conversation

@paulius-krutkis-dcd

@paulius-krutkis-dcd paulius-krutkis-dcd commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Commander parse failures (unknown flags, unknown commands, missing args, bad choices) now exit with code 2, matching the documented usage-error contract. Adds a shared configureCommanderExit hook applied after subcommands are registered.

Test plan

  • pnpm test
  • node build/esm/index.js --bad-flag exits 2
  • node build/esm/index.js search q --limit 11 --token t still exits 4

…ervice, and enhance CLI error handling with tests
@paulius-krutkis-dcd paulius-krutkis-dcd changed the title Update version to 0.1.3 in package.json, add configureCommanderExit s… Map Commander parse errors to exit code 2 Jun 9, 2026
@paulius-krutkis-dcd paulius-krutkis-dcd merged commit be50337 into main Jun 9, 2026
1 check passed
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.

3 participants