Skip to content

fix: return not-found for unknown root commands - #145

Open
lovewave02 wants to merge 1 commit into
8bitAlex:mainfrom
lovewave02:fix/unknown-command-exit
Open

lovewave02 wants to merge 1 commit into
8bitAlex:mainfrom
lovewave02:fix/unknown-command-exit

Conversation

@lovewave02

Copy link
Copy Markdown

Summary

  • return structured COMMAND_NOT_FOUND for unknown root commands instead of printing help and exiting successfully
  • preserve root help for bare raid and existing registered commands
  • document the behavior change in the 0.18.0 notes and llms.txt

Closes #125.

Verification

  • docker run --rm -v "$PWD":/repo -w /repo golang:1.25 sh -lc '/usr/local/go/bin/gofmt -w src/cmd/raid.go src/cmd/raid_test.go && /usr/local/go/bin/go test ./src/cmd'\n- docker run --rm -v "$PWD":/repo -w /repo golang:1.25 /usr/local/go/bin/go test ./...\n- npm ci\n- npm run build\n- git diff --check\n- binary smoke: /tmp/raid notacommand exits 5\n- binary smoke: /tmp/raid --json notacommand exits 5 with COMMAND_NOT_FOUND\n

This branch has not been deployed

No deployments
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.

Unknown command exits 0 and prints help — typos silently "succeed" in scripts

1 participant