From aedfbd4550e43c4e5436ab89662374ccc0b2aa74 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 17 Dec 2019 10:25:07 +0000 Subject: [PATCH] Add `garden` to root execution allow list for Concourse CI containers - Concourse CI uses `garden` under the hood for its containers. - Running the Homebrew Docker container for a Concourse job was failing with the "can't run as root" error. In the same way as bc320ad2291f5ec652d8f4bcf3f7b7ff3c9af3bd, this adds `garden` as one of the allowed providers. --- 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 cfa77283c0..6d5720e534 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -390,8 +390,8 @@ fi check-run-command-as-root() { [[ "$(id -u)" = 0 ]] || 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 + # Allow Azure Pipelines/Docker/Concourse/Kubernetes to do everything as root (as it's normal there) + [[ -f /proc/1/cgroup ]] && grep -E "azpl_job|docker|garden|kubepods" -q /proc/1/cgroup && return # Homebrew Services may need `sudo` for system-wide daemons. [[ "$HOMEBREW_COMMAND" = "services" ]] && return