File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,18 @@ if [[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]]; then
10
10
nvm install lts;
11
11
fi
12
12
13
+ nvm use newest;
13
14
echo ' nvm use newest &>/dev/null' >> " $BASH_ENV " ;
15
+
16
+ # Confirm that the Node.js version matches what is expected
17
+ # using the fully resolved version number from the other
18
+ # script, 'resolve-node-js-version.sh'. This is necessary
19
+ # because nvm-windows will silently fail if there's an error
20
+ # while downloading (and Node.js servers are unstable lately)
21
+ # See: https://github.com/coreybutler/nvm-windows/issues/738
22
+ if [ " $( node -v) " != " v$( cat ~ /.node-js-version) " ]; then
23
+ exit 1;
24
+ fi
14
25
else
15
26
# Copyright (c) 2019 CircleCI Public
16
27
# (derived from https://github.com/CircleCI-Public/node-orb/blob/master/src/scripts/install-nvm.sh)
You can’t perform that action at this time.
0 commit comments