mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew: allow root in podman containers
This commit is contained in:
parent
58b03edb94
commit
c16d2d291a
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user