diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 5dcf7aeadd..fe3b64b6cb 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -386,7 +386,7 @@ EOS ${HOMEBREW_CELLAR} is not writable. You should change the ownership and permissions of ${HOMEBREW_CELLAR} back to your user account: - sudo chown -R \$(whoami) ${HOMEBREW_CELLAR} + sudo chown -R ${USER-\$(whoami)} ${HOMEBREW_CELLAR} EOS fi