diff options
| author | Dominyk Tiller | 2015-10-18 19:10:39 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2015-10-19 05:33:08 +0100 |
| commit | aa0a22147da8af723405f4f5bf4113ad78d60b68 (patch) | |
| tree | d756efbcfc88a79a86b64553b49e23b00deebea0 /Library | |
| parent | b743cadd873ac4ada7a5567000231e006eeb4591 (diff) | |
| download | brew-aa0a22147da8af723405f4f5bf4113ad78d60b68.tar.bz2 | |
brew: tighten sudo checks
`reinstall` can currently be executed under sudo and has every chunk of problems
running install under sudo does when `brew` isn't root owned.
Likewise with `postinstall` which we increasingly use to create directories and
move/install files elsewhere. Using sudo there both masks deeper issues and
makes uninstall troublesome.
Closes Homebrew/homebrew#45112.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/brew.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/brew.rb b/Library/brew.rb index e0e9673a9..f718f9c0d 100755 --- a/Library/brew.rb +++ b/Library/brew.rb @@ -97,7 +97,7 @@ begin cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd) - sudo_check = %w[ install link pin unpin upgrade ] + sudo_check = %w[ install reinstall postinstall link pin unpin upgrade ] if sudo_check.include? cmd if Process.uid.zero? && !File.stat(HOMEBREW_BREW_FILE).uid.zero? @@ -106,7 +106,7 @@ begin 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. - EOS + EOS end end |
