mirror of
https://github.com/actions/runner-images.git
synced 2025-12-17 15:20:11 +00:00
[Ubuntu] do not add homebrew to $PATH (#6240)
This commit is contained in:
@@ -11,14 +11,10 @@ source $HELPER_SCRIPTS/install.sh
|
||||
|
||||
# Install the Homebrew on Linux
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
brew_shellenv="/home/linuxbrew/.linuxbrew/bin/brew shellenv"
|
||||
|
||||
# Update /etc/environment
|
||||
## Put HOMEBREW_* variables.
|
||||
$brew_shellenv | grep 'export HOMEBREW' | sed -E 's/^export (.*);$/\1/' | tr -d '"' | sudo tee -a /etc/environment
|
||||
# add brew executables locations to PATH
|
||||
brew_path=$($brew_shellenv | grep '^export PATH' | sed -E 's/^export PATH="([^$]+)\$.*/\1/')
|
||||
prependEtcEnvironmentPath "$brew_path"
|
||||
# Invoke shellenv to make brew available during runnig session
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
|
||||
setEtcEnvironmentVariable HOMEBREW_NO_AUTO_UPDATE 1
|
||||
setEtcEnvironmentVariable HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS 3650
|
||||
|
||||
|
||||
Reference in New Issue
Block a user