fix(cli): make rtk stats a real alias of gain (#3263) - #3312
Open
NanoRisk6 wants to merge 1 commit into
Open
Conversation
`rtk stats` was not a clap subcommand, so parse fallback tried to spawn a PATH binary named `stats` and died with opaque exit 127. Route stats to gain (visible alias) and mark it meta so bad flags never fall through.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
rtk statsexited 127 with only[rtk: No such file or directory (os error 2)]and no table. Users expected savings stats (likertk gain); instead the CLI fell through parse-fallback and tried to spawn a PATH binary namedstats. Fixes #3263.Why This Change Was Made
visible_alias = "stats"ongainstatstoRTK_META_COMMANDSso bad flags never fall through to raw spawnrtk stats --dailyparses asGain { daily: true }User Impact
rtk stats(and flags like--daily) works as token-savings summary — same asgain. No more opaque 127 when ccusage/npx are unrelated.Evidence