Skip to content

Commit add4a12

Browse files
committed
Only remove npm.ps1 if it exists
1 parent a845126 commit add4a12

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.evergreen/InstallNode.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Get-ChildItem -Path $PSScriptRoot
2020
Set-Location -Path $node_dir
2121
Remove-Item .\npm
2222
Remove-Item .\npm.cmd
23-
Remove-Item .\npm.ps1
23+
if (Test-Path .\npm.ps1) { Remove-Item .\npm.ps1 }
2424
Remove-Item .\npx
2525
Remove-Item .\npx.cmd
2626
Move-Item .\node_modules\npm -Destination .\node_modules\npm2

.evergreen/install-node.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ set -e
22
set -x
33
export BASEDIR="$PWD/.evergreen"
44

5-
NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows
5+
if echo $NODE_JS_VERSION | grep -q ^20 ; then
6+
NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows
7+
else
8+
NPM_VERSION=10.9.0
9+
fi
610

711
if [ "$OS" == "Windows_NT" ]; then
812
powershell "$(cygpath -w "$BASEDIR")"/InstallNode.ps1

0 commit comments

Comments
 (0)