From b0f079907738b61daba8d113a78e43cad7402930 Mon Sep 17 00:00:00 2001 From: jarugupj <121142710+jarugupj@users.noreply.github.com> Date: Wed, 8 Jul 2026 22:33:56 +0000 Subject: [PATCH] Fix e2e-install test failing on tag pushes The e2e-install job runs on every push, including tags. On a tag push the checkout is a detached HEAD, so `git rev-parse --abbrev-ref HEAD` returns the literal "HEAD" rather than a ref name. That value was passed to install.sh as BRANCH, producing `git clone --branch HEAD`, which fails with "Remote branch HEAD not found in upstream origin". Prefer GITHUB_REF_NAME (the tag or branch GitHub provides) and fall back to rev-parse for local runs. Co-Authored-By: Claude Opus 4.7 --- scripts/e2e-install-test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/e2e-install-test.sh b/scripts/e2e-install-test.sh index 3bca778c..b289ad24 100755 --- a/scripts/e2e-install-test.sh +++ b/scripts/e2e-install-test.sh @@ -36,7 +36,8 @@ KEEP_DATA=false bash scripts/uninstall.sh 2>/dev/null || true # Phase 2: Install from source # ============================================================================= info "Phase 2: Installing from source..." -BRANCH=$(git rev-parse --abbrev-ref HEAD) +# Use the ref GitHub provides; on tag pushes rev-parse returns a detached "HEAD" +BRANCH="${GITHUB_REF_NAME:-$(git rev-parse --abbrev-ref HEAD)}" # Build CLI from source too when CLI_BRANCH is set (e.g., for testing unreleased CLI features) BRANCH="$BRANCH" CLI_BRANCH="${CLI_BRANCH:-}" bash scripts/install.sh