diff --git a/images/linux/scripts/installers/configure-environment.sh b/images/linux/scripts/installers/configure-environment.sh index 9b2c2c6e0..03a39f1dc 100644 --- a/images/linux/scripts/installers/configure-environment.sh +++ b/images/linux/scripts/installers/configure-environment.sh @@ -7,14 +7,9 @@ echo ImageOS=$IMAGE_OS | tee -a /etc/environment # Set the ACCEPT_EULA variable to Y value to confirm your acceptance of the End-User Licensing Agreement echo ACCEPT_EULA=Y | tee -a /etc/environment -# Create a file to store user-related global environment variables -touch /etc/profile.d/env_vars.sh -# Set BASH_ENV variable pointed to the file with user-related global environment variables for non-interactive sessions -echo "BASH_ENV=/etc/profile.d/env_vars.sh" | tee -a /etc/environment - # This directory is supposed to be created in $HOME and owned by user(https://github.com/actions/virtual-environments/issues/491) mkdir -p /etc/skel/.config/configstore -echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/profile.d/env_vars.sh +echo 'export XDG_CONFIG_HOME=$HOME/.config' | tee -a /etc/skel/.bashrc # Change waagent entries to use /mnt for swapfile sed -i 's/ResourceDisk.Format=n/ResourceDisk.Format=y/g' /etc/waagent.conf diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index e187d9fa7..5acae9c27 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -89,6 +89,7 @@ done setEtcEnvironmentVariable DOTNET_SKIP_FIRST_TIME_EXPERIENCE 1 setEtcEnvironmentVariable DOTNET_NOLOGO 1 setEtcEnvironmentVariable DOTNET_MULTILEVEL_LOOKUP 0 -echo 'export PATH=$PATH:$HOME/.dotnet/tools' | tee -a /etc/profile.d/env_vars.sh +prependEtcEnvironmentPath /home/runner/.dotnet/tools +echo 'export PATH="$PATH:$HOME/.dotnet/tools"' | tee -a /etc/skel/.bashrc invoke_tests "DotnetSDK" \ No newline at end of file diff --git a/images/linux/scripts/installers/nvm.sh b/images/linux/scripts/installers/nvm.sh index 4962ea819..36b5e7916 100644 --- a/images/linux/scripts/installers/nvm.sh +++ b/images/linux/scripts/installers/nvm.sh @@ -8,7 +8,7 @@ export NVM_DIR="/etc/skel/.nvm" mkdir $NVM_DIR VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name') curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash -echo 'export NVM_DIR=$HOME/.nvm' | tee -a /etc/profile.d/env_vars.sh +echo 'export NVM_DIR=$HOME/.nvm' | tee -a /etc/skel/.bash_profile echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/images/linux/scripts/installers/php.sh b/images/linux/scripts/installers/php.sh index 9912c169d..e305bc6eb 100644 --- a/images/linux/scripts/installers/php.sh +++ b/images/linux/scripts/installers/php.sh @@ -87,8 +87,12 @@ php composer-setup.php sudo mv composer.phar /usr/bin/composer php -r "unlink('composer-setup.php');" +# Update /etc/environment +prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin + + # Add composer bin folder to path -echo 'export PATH=$PATH:$HOME/.config/composer/vendor/bin' | tee -a /etc/profile.d/env_vars.sh +echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc #Create composer folder for user to preserve folder permissions mkdir -p /etc/skel/.composer diff --git a/images/linux/scripts/installers/python.sh b/images/linux/scripts/installers/python.sh index 1cd705d8b..193d810b8 100644 --- a/images/linux/scripts/installers/python.sh +++ b/images/linux/scripts/installers/python.sh @@ -41,6 +41,6 @@ if isUbuntu18 || isUbuntu20 ; then fi # Adding this dir to PATH will make installed pip commands are immediately available. -echo 'export PATH=$PATH:$HOME/.local/bin' | tee -a /etc/profile.d/env_vars.sh +echo 'export PATH="$PATH:$HOME/.local/bin"' | tee -a /etc/skel/.bashrc invoke_tests "Tools" "Python"