-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
brew install fails because sudo chef-client #111
Comments
I have hit this in other circumstances. Some brew cask installs have sudo embedded like wireshark:
The work around used to be having chef run the install as root to negate the sudo call. This now fails with
Once you remove this and install as the current user brew blows up expecting a tty to be available to prompt for a password
I'm not sure how to approach this, see other discussions here Homebrew/brew#1476 |
quick update, you can currently work around this outright failing by creating a sudo askpass script similar to this https://github.com/markcarver/mac-ssh-askpass and then setting it in your environment with $SUDO_ASKPASS - granted this will display a pop up to the user for their sudo password in the middle of a chef run... not ideal but it's enough for now |
Closing as a dupe of #105 |
Cookbook version
2.1.2
Chef-client version
12.5.1
Platform Details
Mac OSX
Scenario:
Bootstrapping a new node fails when I attempt to install packages because chef-client is running as sudo/root and as of November 1st, 2016 Homebrew has disabled running brew with root. This also occurs even when I have
default['homebrew']['owner'] = 'my username'
Homebrew/brew@eabdbde
Steps to Reproduce:
bootstrap a node or sudo chef-client with a recipe that installs a package using brew.
The text was updated successfully, but these errors were encountered: