mirror of
https://github.com/actions/runner-images.git
synced 2026-01-08 03:07:32 +08:00
Merge pull request #1970 from LeonidLapshin/v-llaphin/fix-path
[Linux] Fix PATH variable
This commit is contained in:
@@ -17,13 +17,12 @@ rm -rf $HELPER_SCRIPT_FOLDER
|
||||
rm -rf $INSTALLER_SCRIPT_FOLDER
|
||||
chmod 755 $IMAGE_FOLDER
|
||||
|
||||
# Check PATH
|
||||
if [[ $PATH == \"*\" ]]
|
||||
then
|
||||
echo "ERROR: PATH contains quotes"
|
||||
echo "PATH = $PATH"
|
||||
exit 1
|
||||
fi
|
||||
# Remove quotes around PATH
|
||||
ENVPATH=$(grep 'PATH=' /etc/environment | head -n 1 | sed -z 's/^PATH=*//')
|
||||
ENVPATH=${ENVPATH#"\""}
|
||||
ENVPATH=${ENVPATH%"\""}
|
||||
echo "PATH=$ENVPATH" | sudo tee -a /etc/environment
|
||||
echo "Updated /etc/environment: $(cat /etc/environment)"
|
||||
|
||||
# Clean yarn and npm cache
|
||||
yarn cache clean
|
||||
|
||||
Reference in New Issue
Block a user