diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index d690f3804..571538a30 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -14,8 +14,7 @@ export CARGO_HOME=/usr/share/rust/.cargo curl https://sh.rustup.rs -sSf | sh -s -- -y -# Add Cargo and Rust binaries to the machine path -echo "PATH=${CARGO_HOME}/bin:$PATH" | tee -a /etc/environment +# Initialize environment variables source $CARGO_HOME/env # Install common tools diff --git a/images/linux/scripts/installers/updatepath.sh b/images/linux/scripts/installers/updatepath.sh new file mode 100644 index 000000000..7d63ceb1e --- /dev/null +++ b/images/linux/scripts/installers/updatepath.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +CARGO_HOME=/usr/share/rust/.cargo +DOTNET_TOOLS_HOME=/home/runner/.dotnet/tools +PHP_COMPOSER_HOME=/home/runner/.config/composer/vendor/bin +echo "PATH=${CARGO_HOME}/bin:${PATH}:${DOTNET_TOOLS_HOME}:${PHP_COMPOSER_HOME}" | tee -a /etc/environment \ No newline at end of file diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 675b8934e..9002370a7 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -167,6 +167,7 @@ "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/updatepath.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh" ], diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 2d540af5e..2d6125101 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -170,6 +170,7 @@ "{{template_dir}}/scripts/installers/terraform.sh", "{{template_dir}}/scripts/installers/vcpkg.sh", "{{template_dir}}/scripts/installers/zeit-now.sh", + "{{template_dir}}/scripts/installers/updatepath.sh", "{{template_dir}}/scripts/installers/dpkg-config.sh" ], "environment_vars": [