Homebrew / install

📥 Homebrew (un)installer
https://brew.sh
BSD 2-Clause "Simplified" License
2.15k stars 1.02k forks source link

Fix installation in environments where sudo is missing #812

Closed slonopotamus closed 11 months ago

slonopotamus commented 11 months ago

Homebrew allows running as root in some environments (Docker, Kubernetes, GitHub Actions, etc). When we're root, there is no point using sudo. So, just invoke commands directly, thus removing requirement to have a functional sudo command.

I personally plan to use this in macOS containers.

slonopotamus commented 11 months ago

Reorganised code a bit so it should be clearer why I need two checks.