Skip to content

Commit

Permalink
test(NODE-5606): use npm 9 on eol node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Sep 1, 2023
1 parent 177a4fc commit 9f230d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -o errexit # Exit the script with error if any of the commands fail

NODE_LTS_VERSION=${NODE_LTS_VERSION:-16}
NODE_LOWEST_LTS=18

source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"

Expand Down Expand Up @@ -96,7 +97,11 @@ fi

if [[ $operating_system != "win" ]]; then
# Update npm to latest when we can
npm install --global npm@latest
if [[ $NODE_LTS_VERSION -lt $NODE_LOWEST_LTS ]]; then
npm install --global npm@9
else
npm install --global npm@latest
fi
hash -r
fi

Expand Down

0 comments on commit 9f230d3

Please sign in to comment.