Closed slonopotamus closed 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.
sudo
I personally plan to use this in macOS containers.
Reorganised code a bit so it should be clearer why I need two checks.
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.