mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Remove eval statement (#3920)
This commit is contained in:
committed by
GitHub
parent
9a9885aa73
commit
e9edf6552f
@@ -11,14 +11,13 @@ source $HELPER_SCRIPTS/install.sh
|
|||||||
|
|
||||||
# Install the Homebrew on Linux
|
# Install the Homebrew on Linux
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
|
brew_shellenv="/home/linuxbrew/.linuxbrew/bin/brew shellenv"
|
||||||
|
|
||||||
# Update /etc/environemnt
|
# Update /etc/environment
|
||||||
## Put HOMEBREW_* variables
|
## Put HOMEBREW_* variables.
|
||||||
## The variable `HOMEBREW_SHELLENV_PREFIX` will be exported to avoid adding duplicate entries to the environment variables.
|
$brew_shellenv | grep 'export HOMEBREW' | sed -E 's/^export (.*);$/\1/' | sudo tee -a /etc/environment
|
||||||
HOMEBREW_SHELLENV_PREFIX='' brew shellenv | grep 'export HOMEBREW'| sed -E 's/^export (.*);$/\1/' | sudo tee -a /etc/environment
|
|
||||||
# add brew executables locations to PATH
|
# add brew executables locations to PATH
|
||||||
brew_path=$(HOMEBREW_SHELLENV_PREFIX='' brew shellenv | grep '^export PATH' | sed -E 's/^export PATH="([^$]+)\$.*/\1/')
|
brew_path=$($brew_shellenv | grep '^export PATH' | sed -E 's/^export PATH="([^$]+)\$.*/\1/')
|
||||||
prependEtcEnvironmentPath "$brew_path"
|
prependEtcEnvironmentPath "$brew_path"
|
||||||
setEtcEnvironmentVariable HOMEBREW_NO_AUTO_UPDATE 1
|
setEtcEnvironmentVariable HOMEBREW_NO_AUTO_UPDATE 1
|
||||||
setEtcEnvironmentVariable HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS 3650
|
setEtcEnvironmentVariable HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS 3650
|
||||||
|
|||||||
Reference in New Issue
Block a user