Skip to content

Commit 11699e6

Browse files
authored
Guard FORCE_NODE_VERSION in the version error path (#7983)
Installing on the wrong node version dies with "FORCE_NODE_VERSION: unbound variable" instead of explaining itself. The script runs under set -u and this is the one place the variable is read bare; the three other reads all default it.
1 parent 2b2f8b3 commit 11699e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/build/npm-postinstall.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ main() {
6767

6868
if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then
6969
echo "ERROR: code-server currently requires node v24."
70-
if [ -n "$FORCE_NODE_VERSION" ]; then
70+
if [ -n "${FORCE_NODE_VERSION:-}" ]; then
7171
echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION."
7272
fi
7373
echo "We have detected that you are on node v$major_node_version"

0 commit comments

Comments
 (0)