Skip to content

Commit 942b70a

Browse files
fix: install nvm in task local directory instead of home (#1555)
1 parent e2445f0 commit 942b70a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.evergreen/install-node.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ else
2323
sed -i "$HOME/.npmrc" -e 's/^prefix=.*$//'
2424
fi
2525
fi
26-
export NVM_DIR="$HOME/.nvm"
26+
export NVM_DIR="$BASEDIR/.nvm"
27+
mkdir -p "${NVM_DIR}"
2728

2829
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
2930

.evergreen/setup-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ "$OS" != "Windows_NT" ]; then
99
if which realpath; then # No realpath on macOS, but also not needed there
1010
export HOME="$(realpath "$HOME")" # Needed to de-confuse nvm when /home is a symlink
1111
fi
12-
export NVM_DIR="$HOME/.nvm"
12+
export NVM_DIR="$BASEDIR/.nvm"
1313
echo "Setting NVM environment home: $NVM_DIR"
1414
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
1515
set +x # nvm is very verbose

0 commit comments

Comments
 (0)