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

brew.sh: disable running Homebrew as root. #1452

Merged
merged 1 commit into from
Nov 6, 2016
Merged

brew.sh: disable running Homebrew as root. #1452

merged 1 commit into from
Nov 6, 2016

Conversation

MikeMcQuaid
Copy link
Member

November 1st 2016 has come and gone so it's time to disable this.

Also, add comments explaining why the things that have been whitelisted have been (to avoid more being added without good justification).

November 1st 2016 has come and gone so it's time to disable this.

Also, add comments explaining why the things that have been whitelisted
have been (to avoid more being added without good justification).
@MikeMcQuaid MikeMcQuaid added the in progress Maintainers are working on this label Nov 6, 2016
@adidalal
Copy link

adidalal commented Nov 6, 2016

Homebrew Cask also shouldn't be run with sudo, FWIW. But we do call .pkg installs and overwrite .app bundles if the --force flag is given, which may use sudo.

If this PR doesn't block that behavior, then I don't know that HBC even needs that exception (sudo brew cask is not supported).

Haven't poked around the core code too much, @reitermarkus or @jawshooah may be able to confirm.

@MikeMcQuaid
Copy link
Member Author

@adidalal I've previously used it when I want to call from a script and not have it prompt for sudo access.

@MikeMcQuaid MikeMcQuaid merged commit 586b35f into Homebrew:master Nov 6, 2016
@MikeMcQuaid MikeMcQuaid deleted the disable-root branch November 6, 2016 20:42
@MikeMcQuaid MikeMcQuaid removed the in progress Maintainers are working on this label Nov 6, 2016
@reitermarkus
Copy link
Member

reitermarkus commented Nov 6, 2016

I've previously used it when I want to call from a script and not have it prompt for sudo access.

This will make cache files, Caskroom sub-directories, and all other files that are extracted/copied root-owned, so you shouldn't do that.

Therefore, as @adidalal said,

sudo brew cask is not supported

@MikeMcQuaid
Copy link
Member Author

@reitermarkus 🆒, will 👍 a PR that removes it. What's the "correct" way to handle what I mentioned?

@pataar
Copy link

pataar commented Nov 8, 2016

Question: Will this also stop me from using sudo brew services restart httpd24 for example?
Still supporting sudo brew services. Awesome :)

@Homebrew Homebrew locked and limited conversation to collaborators Nov 8, 2016
@reitermarkus
Copy link
Member

What's the "correct" way to handle what I mentioned?

I don't know if there is such a thing as the "correct" way for sudo.

I had been using a variation on https://gist.github.com/cowboy/3118588 in my dotfiles, but as you can see from my comment over there, I recently had to move to this, due to this.

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

Successfully merging this pull request may close these issues.

None yet

4 participants