Skip to content
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

Homebrew Cron update should use Homebrew::User #20

Open
Mitsuwa opened this issue Feb 3, 2016 · 0 comments
Open

Homebrew Cron update should use Homebrew::User #20

Mitsuwa opened this issue Feb 3, 2016 · 0 comments

Comments

@Mitsuwa
Copy link

Mitsuwa commented Feb 3, 2016

If you include the homebrew class and override the $user and $group

class {'homebrew':
  user  => $user,
  group => $group;
}

You are going to have problems with running homebrew update cron, as the homebrew update cron will attempt to run as root
https://github.com/gildas/puppet-homebrew/blob/master/manifests/init.pp#L233

Which will error

Error: Cowardly refusing to 'sudo brew update'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.

if you update this
https://github.com/gildas/puppet-homebrew/blob/master/manifests/init.pp#L233

to use $homebrew::user you won't have this problem. Also, since $homebrew::user already defaults to root, it should be pretty safe to do
https://github.com/gildas/puppet-homebrew/blob/master/manifests/init.pp#L79

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant