Skip to content
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

Print help when rye config is given without any argument #660

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

dsp
Copy link
Contributor

@dsp dsp commented Feb 15, 2024

We use clap's ArgGroup to make any combination of --get, --set, --set-int, --set-bool and --unset
required. If not we print the help.

  • config: require any of --get

…r print help

We now print the help text if none of the arguments --get, --set,
--set-int, --set-help or --unset are present.
@mitsuhiko mitsuhiko merged commit ff130c4 into astral-sh:main Feb 16, 2024
6 checks passed
@dsp dsp deleted the dsp/require-arg branch February 16, 2024 09:34
j178 pushed a commit to j178/rye that referenced this pull request Feb 18, 2024
@sondr3
Copy link

sondr3 commented Feb 20, 2024

This PR broke rye config --show-path, it now errors out.

❯ rye config --show-path
error: one or more required arguments were not provided

dsp added a commit to dsp/rye that referenced this pull request Feb 20, 2024
PR astral-sh#660 (ff130c4) makes an action argument required. This breaks `rye
config --show-path`. This fixes this behavior by requiring any argument,
but showing help when no argument is provided.
@dsp dsp mentioned this pull request Feb 20, 2024
dsp added a commit to dsp/rye that referenced this pull request Feb 20, 2024
PR astral-sh#660 (ff130c4) makes an action argument required. This breaks `rye
config --show-path`. This fixes this behavior by requiring any argument,
but showing help when no argument is provided.
@dsp
Copy link
Contributor Author

dsp commented Feb 20, 2024

Good catch. #706 fixes this.

dsp added a commit to dsp/rye that referenced this pull request Feb 20, 2024
PR astral-sh#660 (ff130c4) makes an action argument required. This breaks `rye
config --show-path`. This fixes this behavior by requiring any argument,
but showing help when no argument is provided.

fix
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.

None yet

3 participants