On 2020-07-07 19:54, Miro HronĨok wrote:
- Add a custom --no-warn-root-privileges option
- Hide the warning when $RPM_BUILD_ROOT is set.
- Introduce an environment variable (e.g. PIP_NOWARN_ROOT)
- Introduce our warning upstream, but make it opt-in only.
- Hide the warning when --root is set.
What do you think?
I like option 5 as well. It's just a warning, not an error, because there are cases where you "know what you're doing", such as containers/VMs, where "sudo pip" may be appropriate. All uses of --root that come to my mind are such cases.
Users who follow tutorials without "knowing what they're doing" are very unlikely to use --root.