brew.sh: allow cask to be run as root.

It also uses `sudo` for legitimate things e.g. installing `.pkg`s
systemwide.
This commit is contained in:
Mike McQuaid 2016-09-01 20:35:12 +01:00
parent 6622b565ee
commit 0cfe51b328

View File

@ -203,6 +203,7 @@ check-run-command-as-root() {
[[ "$(id -u)" = 0 ]] || return
export HOMEBREW_NO_SANDBOX="1"
[[ "$HOMEBREW_COMMAND" = "cask" ]] && return
[[ "$HOMEBREW_COMMAND" = "services" ]] && return
onoe <<EOS