Skip to content

fix(cli): clistat: accept positional arg for stat disk cmd #8911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2023

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Aug 4, 2023

Fixes #8680.

You can now do coder stat disk /some/path as well as coder stat disk --path /some/path.
You can also, confusingly, also do coder stat disk --path /some/path /some/other/path, in which case the positional arg /some/other/path will take precedence.

Changing this behaviour (i.e. making path a required arg for this command) would be breaking, so preserving existing behaviour.

Additionally, statting a nonexistent path now looks somewhat nicer:

coder stat disk /foo
running command "coder stat disk": not found: "/foo"

@johnstcn johnstcn self-assigned this Aug 4, 2023
@johnstcn johnstcn requested review from mafredri and mtojek August 4, 2023 16:30
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@johnstcn johnstcn merged commit 82e0e2e into main Aug 7, 2023
@johnstcn johnstcn deleted the cj/clistat-disk-posarg branch August 7, 2023 15:26
@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coder stat's first argument is accepted but doesn't work as expected
2 participants