brew: allow root in podman containers

This commit is contained in:
Dawid Dziurla 2024-10-15 10:39:10 +02:00
parent 58b03edb94
commit c16d2d291a
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -192,8 +192,9 @@ source "${HOMEBREW_LIBRARY}/Homebrew/utils/helpers.sh"
check-run-command-as-root() {
[[ "${EUID}" == 0 || "${UID}" == 0 ]] || return
# Allow Azure Pipelines/GitHub Actions/Docker/Concourse/Kubernetes to do everything as root (as it's normal there)
# Allow Azure Pipelines/GitHub Actions/Docker/Podman/Concourse/Kubernetes to do everything as root (as it's normal there)
[[ -f /.dockerenv ]] && return
[[ -f /run/.containerenv ]] && return
[[ -f /proc/1/cgroup ]] && grep -E "azpl_job|actions_job|docker|garden|kubepods" -q /proc/1/cgroup && return
# Homebrew Services may need `sudo` for system-wide daemons.