-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Disallow running brew cask
as root
.
#1476
Conversation
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.
Once tests are 💚 🚢
This breaks a lot of CM tools like chef/puppet that function with out having a tty available for a user to enter a password. Theres been a lot of back and fourth about this it seems and I'm still not sure what the correct solution is, could someone point me in the right direction? Homebrew/homebrew-cask#5667 |
@bcg62, see #1452 (comment). Basically there are two “solutions”: Either run a |
thanks @reitermarkus This seems fine for some simple bash scripting but when trying to do something similar in a real CM tool its very intrusive and dangerous to modify sudo on the fly to preform an action, or do something like a keep alive in the background. Its also a broader discussion for the tool responsible referenced above. |
Ok, I just read through the two discussions you linked above, and it seems like adding support for |
Thanks, would you be able to share your example? |
First you will have to save your askpass-script to Then you can either do this SUDO_ASKPASS="/path/to/script" brew cask install cask-which-requires-sudo or this export SUDO_ASKPASS="/path/to/script"
brew cask install cask-which-requires-sudo
brew cask install another-cask-which-requires-sudo |
brew tests
with your changes locally?As discussed in #1452.