-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New feature idea: sudo protection #727
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
Comments
Interesting. I do prefer this approach over the pip one. A few thoughts:
I think this could be useful and may save a few systems. I just don't know what the implications are when it comes to overriding the real |
My preference is that no protection is provided, someone can create a |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions. |
This is inspired by pypa/pip#2403
sudo pip install
and thinking that it's installing to their activated virtualenv when in fact, it's installing to the global site-packages becausesudo
is usually configured to throw out most environment variables andVIRTUAL_ENV
is probably one of them.pip
is invoked withsudo
, but folks make the point that it's valid to want to usepip
withsudo
.So I decided to rethink this with the observation:
Maybe we shouldn't prevent
pip
from being used withsudo
, but maybe the real problem is that people are usingsudo
after activating a virtualenv.My idea is to have the
activate
script create asudo
that overrides the realsudo
and prints a warning.Here's a prototype of the idea without actually coding it up, because there's a good chance that this idea is too crazy and will be rejected, similarly to how the pip idea was rejected.
Good idea worth a PR?
or too annoying?
Cc: @sudarkoff, @aconrad
The text was updated successfully, but these errors were encountered: