Support running the Linuxbrew docker image in Kubernetes

This commit is contained in:
Tom Forbes 2019-05-30 20:06:25 +01:00 committed by GitHub
parent afe60d6605
commit bc320ad229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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