Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ If you want to run the Homebrew installer non-interactively without prompting fo
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

By default the script will not run as root as this gives exessively high permissions which could potentially lead to issues. If you need to overide this you can prefix `ALLOWROOT=1` to the command (similarly to `NONINTERACTIVE` above).

## Uninstall Homebrew

```bash
Expand Down
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,10 @@ EOABORT
fi
HOMEBREW_CORE="${HOMEBREW_REPOSITORY}/Library/Taps/homebrew/homebrew-core"

check_run_command_as_root
if [[ -z "${ALLOWROOT-}" ]]
then
check_run_command_as_root
fi

if [[ -d "${HOMEBREW_PREFIX}" && ! -x "${HOMEBREW_PREFIX}" ]]
then
Expand Down
Loading