From cb8959331d69aaaa2937a1116c1e9913de63b1db Mon Sep 17 00:00:00 2001 From: Viktor Vaczi Date: Mon, 27 Jul 2026 13:36:07 +0200 Subject: [PATCH] fix(deploy/site): probe Vercel via npx in preflight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `command -v vercel` gated the check on a global install that nobody here has — this repo always invokes it as `npx vercel`. The probe was silently skipped, so preflight never confirmed the three env-var names that 04-set-secrets.sh needs to carry over. SKIP_VERCEL_CHECK=1 opts out. Names only; values are never read or printed. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01LAmkjM7okPdScp9XLW1JVr --- deploy/site/01-preflight.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deploy/site/01-preflight.sh b/deploy/site/01-preflight.sh index 33c6bf8..d4fc6e7 100755 --- a/deploy/site/01-preflight.sh +++ b/deploy/site/01-preflight.sh @@ -96,8 +96,10 @@ case "$ns" in *becky*|*ernest*) chk "on Cloudflare NS ($ns)" 0 ;; *) chk "on Cloudflare NS ($ns)" 1 "the zone must be on Cloudflare nameservers" ;; esac -section "vercel (needed only by 09-detach / 99-rollback)" -if command -v vercel >/dev/null 2>&1 || [ -n "${VERCEL_TOKEN:-}" ]; then +section "vercel (env-var names for 04-set-secrets; detach/rollback for 09/99)" +# Deliberately via npx rather than a global `vercel` binary — that is how this +# repo invokes it everywhere else, and a global install is not a prerequisite. +if [ "${SKIP_VERCEL_CHECK:-0}" != 1 ]; then names="$(npx --yes vercel@latest env ls production --project "$VERCEL_PROJECT" --scope "$VERCEL_TEAM" 2>/dev/null \ | awk '/^ [A-Z]/{print $1}' | sort | tr '\n' ' ' || true)" echo " env var NAMES on Vercel (values never read): ${names:-}" @@ -108,7 +110,7 @@ if command -v vercel >/dev/null 2>&1 || [ -n "${VERCEL_TOKEN:-}" ]; then esac done else - warn "vercel CLI not on PATH and VERCEL_TOKEN unset — skipping (only 09/99 need it)" + warn "SKIP_VERCEL_CHECK=1 — skipping the Vercel probe" fi section "summary"