-
-
Notifications
You must be signed in to change notification settings - Fork 467
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
Add --modify-path and --no-modify-path to self install #664
Conversation
e911af1
to
93c2395
Compare
378e91e
to
d97a5f3
Compare
I wonder if it would not be better to just make all these branches arguments.
|
@@ -597,17 +628,12 @@ fn perform_install( | |||
echo!("For more information read https://mitsuhiko.github.io/rye/guide/installation"); | |||
} | |||
} | |||
// On Windows, we add the rye directory to the user's PATH unconditionally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think at this point it might also sense to align the behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can follow up with this in a separate PR. This way we separate the concerns a bit and can merge one but not the other if we feel like it.
I think the more common approach would be providing Happy to implement whatever you prefer. |
We can do that, and if not passed it defaults to |
463c61d
to
07c5547
Compare
4180e41
to
ed9d74c
Compare
This adds the option to never modify paths to rye install, even when `--yes` is provided. This addresses astral-sh#620. We offer a --modify-path and a --no-modify-path option to either always modify or never modify. Providing --yes, will be the same as --modify-path. This is in line with other command line tools like curl, git and ripgrep. We do this by adding a new enum YesNoArg, which can be obtained by providing an ArgGroup with respective modify_path and no_modify_path boolean values.
On windows the function doesn't use all variables. Use cfg_attr to allow unused_variables.
ed9d74c
to
4fcf897
Compare
Thank you! |
This is an RFC for how we handle skipping certain steps independent
from --yes being present. The PR adds the
--modify-path
and--no-modify-path
flag that can be used to turn off and on pathmodification without prompting the user. his allows people to do
self-installs such as
rye self install --yes --no-modify-path
.The goal here is to get fine grained control over the install process
for headless/non-interactive installations. We use
--x
,--no-x
styleflags inline with popular tools like curl, ripgrep, git, etc.
This should address #620.