From 9f33a9b1be1ea6d135205ecbd25f7fb21b49181c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 23 Mar 2019 12:38:55 +0000 Subject: [PATCH] brew.sh: improve Docker whitelist on Azure pipelines. --- 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 ffcd7c9f6f..b7cd76995b 100644 --- a/Library/Homebrew/brew.sh +++ b/Library/Homebrew/brew.sh @@ -355,8 +355,8 @@ fi check-run-command-as-root() { [[ "$(id -u)" = 0 ]] || return - # Allow Docker to do everything as root (as it's normal there) - [[ -f /proc/1/cgroup ]] && grep docker -q /proc/1/cgroup && 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 # Homebrew Services may need `sudo` for system-wide daemons. [[ "$HOMEBREW_COMMAND" = "services" ]] && return