Skip to content

Fix auth whoami alias#73

Merged
crcatala merged 1 commit into
mainfrom
fix/auth-whoami
Jul 15, 2026
Merged

Fix auth whoami alias#73
crcatala merged 1 commit into
mainfrom
fix/auth-whoami

Conversation

@crcatala-vps

Copy link
Copy Markdown
Collaborator

Summary

Fixes tt auth whoami, which failed with Commander’s too many arguments for 'status' error instead of behaving as the documented alias for tt auth status.

Technical details

whoami delegates to the registered status subcommand with parseAsync(..., { from: "user" }). In that mode Commander expects only the selected subcommand’s arguments; supplying "status" again made it an unexpected positional argument. The delegation now passes only --json when requested, or an empty argument list otherwise.

Adds an isolated CLI regression test that runs auth whoami with a temporary HOME, verifies successful execution and the unauthenticated status output, and guards against the prior argument-parsing error.

Testing done

  • bun run test (422 passed; 42 live tests skipped)
  • bun run typecheck
  • bun run lint

Checklist

  • Code follows the project style
  • Regression test added
  • New and existing tests pass
  • Documentation update not needed

@crcatala
crcatala merged commit 2c24104 into main Jul 15, 2026
6 checks 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.

2 participants