Skip to content

Commit 3b3f081

Browse files
fix(NODE-7176): handle node versions without a leading v in install-node.sh (#692)
1 parent d7a7337 commit 3b3f081

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.evergreen/install-node.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ shopt -s nocasematch
4444

4545
while IFS=$'\t' read -r -a row; do
4646
node_index_version="${row[0]}"
47+
echo $node_index_version >> "versions.txt"
4748
node_index_major_version=$(echo $node_index_version | sed -E 's/^v([0-9]+).*$/\1/')
4849
node_index_date="${row[1]}"
4950
[[ "$node_index_version" = "version" ]] && continue # skip tsv header
5051
[[ "$NODE_LTS_VERSION" = "latest" ]] && break # first line is latest
51-
[[ "$NODE_LTS_VERSION" = "$node_index_version" ]] && break # match full version if specified
52+
[[ "$NODE_LTS_VERSION" = "$node_index_version" ]] && break # match full version if specified (v<major>.<minor>.<patch>)
53+
[[ "v$NODE_LTS_VERSION" = "$node_index_version" ]] && break # match full version if specified (without leading `v`)
5254
[[ "$NODE_LTS_VERSION" = "$node_index_major_version" ]] && break # case insensitive compare
5355
done < node_index.tab
5456

0 commit comments

Comments
 (0)