mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Ubuntu] Prepend brew directories to the PATH (#1168)
* prepend * add comment and move installation * change toolcache dir in aws-sam script
This commit is contained in:
@@ -16,7 +16,7 @@ tar -xzvf $TarballPath -C /tmp
|
||||
cd /tmp/awslabs-aws-sam-cli*
|
||||
|
||||
# Use python 3.7 from toolcache to install aws sam, setuptools package required for the installation
|
||||
Python3Dir=$(echo ${AGENT_TOOLSDIRECTORY}/Python/3.7*/x64)
|
||||
Python3Dir=$(echo /opt/hostedtoolcache/Python/3.7*/x64)
|
||||
Python3BinDir="${Python3Dir}/bin"
|
||||
export PATH="$Python3Dir:$Python3BinDir:$PATH"
|
||||
python3 -m pip install setuptools
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
echo "Validate the Homebrew can run after reboot"
|
||||
|
||||
if ! command -v brew; then
|
||||
echo "brew cat not run after reboot"
|
||||
echo "brew executable not found after reboot"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
################################################################################
|
||||
## File: homebrew.sh
|
||||
## Desc: Installs the Homebrew on Linux
|
||||
## Caveat: Brew MUST NOT be used to install any tool during the image build to avoid dependencies, which may come along with the tool
|
||||
################################################################################
|
||||
|
||||
# Source the helpers
|
||||
@@ -20,7 +21,7 @@ sudo chmod -R o+w $HOMEBREW_PREFIX
|
||||
brew shellenv|grep 'export HOMEBREW'|sed -E 's/^export (.*);$/\1/' | sudo tee -a /etc/environment
|
||||
# add brew executables locations to PATH
|
||||
brew_path=$(brew shellenv|grep '^export PATH' |sed -E 's/^export PATH="([^$]+)\$.*/\1/')
|
||||
appendEtcEnvironmentPath "$brew_path"
|
||||
prependEtcEnvironmentPath "$brew_path"
|
||||
|
||||
# Validate the installation ad hoc
|
||||
echo "Validate the installation reloading /etc/environment"
|
||||
|
||||
Reference in New Issue
Block a user