Skip to content

Commit 49f3288

Browse files
baileympearsonmalikj2000
authored andcommitted
ci(NODE-5345): add guards to install_dependencies for necessary env variables (#3713)
1 parent efcb100 commit 49f3288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.evergreen/install-dependencies.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ NODE_LTS_VERSION=${NODE_LTS_VERSION:-14}
55

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

8+
if [[ -z "${npm_global_prefix}" ]]; then echo "npm_global_prefix is unset" && exit 1; fi
9+
if [[ -z "${NODE_ARTIFACTS_PATH}" ]]; then echo "NODE_ARTIFACTS_PATH is unset" && exit 1; fi
10+
811
CURL_FLAGS=(
912
--fail # Exit code 1 if request fails
1013
--compressed # Request a compressed response should keep fetching fast
@@ -90,9 +93,6 @@ else
9093
mv "${NODE_ARTIFACTS_PATH}/${node_directory}" "${NODE_ARTIFACTS_PATH}/nodejs"
9194
fi
9295

93-
export PATH="$NODE_ARTIFACTS_PATH/npm_global/bin:$NODE_ARTIFACTS_PATH/nodejs/bin:$PATH"
94-
hash -r
95-
9696
if [[ $operating_system != "win" ]]; then
9797
# Update npm to latest when we can
9898
npm install --global npm@latest

0 commit comments

Comments
 (0)