From 11699e6cd72f4dfdb8c91e8abf3ea5e4fd54a206 Mon Sep 17 00:00:00 2001 From: denusklo <79653229+denusklo@users.noreply.github.com> Date: Sat, 5 Sep 2026 02:46:24 +0800 Subject: [PATCH] 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. --- ci/build/npm-postinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 3c2bcb2db..29e46b388 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -67,7 +67,7 @@ main() { if [ "$major_node_version" -ne "${FORCE_NODE_VERSION:-24}" ]; then echo "ERROR: code-server currently requires node v24." - if [ -n "$FORCE_NODE_VERSION" ]; then + if [ -n "${FORCE_NODE_VERSION:-}" ]; then echo "However, you have overrided the version check to use v$FORCE_NODE_VERSION." fi echo "We have detected that you are on node v$major_node_version"