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

rye add argument checking #347

Merged
merged 2 commits into from
Jul 7, 2023
Merged

rye add argument checking #347

merged 2 commits into from
Jul 7, 2023

Conversation

bluss
Copy link
Contributor

@bluss bluss commented Jun 25, 2023

Without some restriction, rye add --path foo would previously run as a
successful command that does nothing, which is confusing for the user.
Always require >= 1 requirement in add and remove.

Don't allow rye add --path ./x x y or similar, these arguments make
sense with one requirement only.

I'm not sure if there is a nicer way of reporting argument errors here
than using bail!().

Without some restriction, `rye add --path foo` would previously run as a
successful command that does nothing, which is confusing for the user.

The simplest way forward right now is to require at least one
requirement or dependency.
Don't allow `rye add --path ./x x y` or similar, these arguments make
sense with one requirement only.
@mitsuhiko mitsuhiko merged commit 133c3d2 into astral-sh:main Jul 7, 2023
@bluss bluss deleted the add-path branch July 7, 2023 18:43
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