File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- set -xe
3
+ set -euxo pipefail
4
4
5
5
__dirname=" $( CDPATH= cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
6
6
STRIP_NPX=no
@@ -10,7 +10,7 @@ while getopts "r:g:" opt; do
10
10
r)
11
11
echo " Updating for latest $OPTARG release" >&2
12
12
# release
13
- NODE_VERSION=" $( curl -sL https://nodejs.org/download/release/index.tab | awk ' /^v' " $OPTARG " ' \..*[^a-z0-9]src[^a-z0-9]/ { print substr($1, 2); exit }' ) "
13
+ NODE_VERSION=" $( curl -sL --show-error --fail https://nodejs.org/download/release/index.tab | awk ' BEGIN { found = 0 } /^v' " $OPTARG " ' \..*[^a-z0-9]src[^a-z0-9]/ && !found { found = 1; print substr($1, 2) }' ) "
14
14
NODE_DISTTYPE=" release"
15
15
NODE_TAG=" "
16
16
if [ " X${OPTARG} " = " X6" ]; then
32
32
# not a release?
33
33
if [ -z ${NODE_DISTTYPE+x} ]; then
34
34
# nightly
35
- NODE_VERSION=" $( curl -sL https://nodejs.org/download/nightly/index.tab | awk ' /^v[1-9].*[^a-z0-9]src[^a-z0-9]/ { print substr($1, 2); exit }' ) "
35
+ NODE_VERSION=" $( curl -sL --show-error --fail https://nodejs.org/download/nightly/index.tab | awk ' BEGIN { found = 0 } /^v[1-9].*[^a-z0-9]src[^a-z0-9]/ && !found { found = 1; print substr($1, 2) }' ) "
36
36
NODE_DISTTYPE=" nightly"
37
37
NODE_TAG=" $( echo $NODE_VERSION | sed -E ' s/^[^-]+-//' ) "
38
38
fi
You can’t perform that action at this time.
0 commit comments