Skip to content

Commit

Permalink
Only remove npm.ps1 if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Nov 8, 2024
1 parent a845126 commit 74c9856
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .evergreen/InstallNode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Get-ChildItem -Path $PSScriptRoot
Set-Location -Path $node_dir
Remove-Item .\npm
Remove-Item .\npm.cmd
Remove-Item .\npm.ps1
if (Test-Item .\npm.ps1) { Remove-Item .\npm.ps1 }
Remove-Item .\npx
Remove-Item .\npx.cmd
Move-Item .\node_modules\npm -Destination .\node_modules\npm2
Expand Down
6 changes: 5 additions & 1 deletion .evergreen/install-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ set -e
set -x
export BASEDIR="$PWD/.evergreen"

NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows
if echo $NODE_JS_VERSION | grep -q ^20 ; then
NPM_VERSION=10.8.3 # 10.9.0 does not install well on Windows
else
NPM_VERSION=10.9.0
fi

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

0 comments on commit 74c9856

Please sign in to comment.