From bc320ad2291f5ec652d8f4bcf3f7b7ff3c9af3bd Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Thu, 30 May 2019 20:06:25 +0100 Subject: [PATCH] Support running the Linuxbrew docker image in Kubernetes --- Library/Homebrew/brew.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh index d373039c34..364065b578 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -375,8 +375,8 @@ fi check-run-command-as-root() { [[ "$(id -u)" = 0 ]] || return - # Allow Azure Pipelines/Docker to do everything as root (as it's normal there) - [[ -f /proc/1/cgroup ]] && grep -E "azpl_job|docker" -q /proc/1/cgroup && return + # Allow Azure Pipelines/Docker/Kubernetes to do everything as root (as it's normal there) + [[ -f /proc/1/cgroup ]] && grep -E "azpl_job|docker|kubepods" -q /proc/1/cgroup && return # Homebrew Services may need `sudo` for system-wide daemons. [[ "$HOMEBREW_COMMAND" = "services" ]] && return