From 2d6ee2197bb78c4c60e8c57d955d848d8546091f Mon Sep 17 00:00:00 2001 From: James Wampler Date: Sat, 4 Jul 2026 18:08:00 -0700 Subject: [PATCH] Fall back to wget in ensure_node when curl is unavailable The self-hosted qa runner has neither curl nor wget guaranteed; ensure_node previously assumed curl, breaking smoke-qa on that host. --- scripts/ci/lib.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/ci/lib.sh b/scripts/ci/lib.sh index da40a33..d2f661b 100755 --- a/scripts/ci/lib.sh +++ b/scripts/ci/lib.sh @@ -68,7 +68,14 @@ ensure_node() { if [[ ! -x "$install_dir/bin/node" ]]; then log "node not found on PATH; installing Node.js v$node_version" local tarball="node-v${node_version}-linux-x64" - curl -fsSL "https://nodejs.org/dist/v${node_version}/${tarball}.tar.xz" -o "/tmp/${tarball}.tar.xz" + local url="https://nodejs.org/dist/v${node_version}/${tarball}.tar.xz" + if command -v curl > /dev/null 2>&1; then + curl -fsSL "$url" -o "/tmp/${tarball}.tar.xz" + elif command -v wget > /dev/null 2>&1; then + wget -q "$url" -O "/tmp/${tarball}.tar.xz" + else + fail "neither curl nor wget found on PATH; cannot download Node.js" + fi mkdir -p "$install_dir" tar -xJf "/tmp/${tarball}.tar.xz" -C "$install_dir" --strip-components=1 rm -f "/tmp/${tarball}.tar.xz"