From c16d2d291a1a4f0ac25f28f9d8da52899e0d50f7 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 15 Oct 2024 10:39:10 +0200 Subject: [PATCH] brew: allow root in podman containers --- Library/Homebrew/brew.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index 125861360a..7c59fd881e 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -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.