mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
[ubuntu] Unify approach to /etc/environment (#8904)
* [ubuntu] Unify approach to /etc/environment * [ubuntu] fix typo in XDG_CONFIG_HOME name
This commit is contained in:
committed by
GitHub
parent
da1c04b81a
commit
435ba67550
@@ -4,11 +4,14 @@
|
||||
## Desc: Install Nvm
|
||||
################################################################################
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/etc-environment.sh
|
||||
|
||||
export NVM_DIR="/etc/skel/.nvm"
|
||||
mkdir $NVM_DIR
|
||||
VERSION=$(curl -fsSL https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
|
||||
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
||||
echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment
|
||||
setEtcEnvironmentVariable "NVM_DIR" '$HOME/.nvm'
|
||||
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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user