-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Option to disable "root warning" message. #3760
Comments
Google might have failed me but I did search for this option before asking for it. |
Why would that mean installing as root is a good idea? |
I'm not trying to be mean here but what is the difference if you're going to sudo without my permission anyways? Defeating the entire purpose of the message, whether you sudo or I sudo it's still going as root so the security doesn't even exist at that point. |
All I'm asking for is the option to disable the message because technically it serves no purpose except to cruft our logs when building a docker image for users where startup is done as root, and sure we could sudo into a user just to have you sudo back into root but did you read that "sudo to another user to have bundler sudo as root..." |
@envygeeks I believe the warning's purpose is letting users (mostly newcomers) that run bundler as sudo know that installing as root is not a good idea. The question here is if it worth it adding an option for that specific kind of warnings and for that specific use-case (ie. Docker). I assume other lines also cruft logs when building a docker image, for example: "Use P.S. There is already the |
I requested an option but I don't know if it needs to be an option, maybe just an environment variable like Debian does (or did actually) with RubyGems where you would be like "REALLY_GEM_UPDATE_SYSTEM" except "SILENCE_ROOT_WARNING=true" would just be detected by the sudo warning and skipped. I agree that adding a dedicated option is probably too much to ask for, but maybe just a simple targeted environment variable would be easier to implement and require far less work. |
A pr to that effect, with tests, would probably be mergable! |
I will happily send one sometime this weekend when I have time, thanks! |
I think this has been addressed by #4113 |
It would be cool if we could get an option to disable the root warning message. In the past this message served a useful purpose (even though I always felt that if it didn't pre-warn about sudo it didn't matter anyways) but now that a lot of people are using Docker it's quite common to install gems as root (we do before we drop down to a normal user because it's the startup that's invoking bundler not the user.)
The text was updated successfully, but these errors were encountered: