From e346f1b861ba2c99072437cebbc5680d463825c1 Mon Sep 17 00:00:00 2001 From: "circleci-app[bot]" <127350680+circleci-app[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:11:42 +0000 Subject: [PATCH] fix: add --refs to git ls-remote to exclude dereferenced tag objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without --refs, `git ls-remote --tags` also returns lines like `refs/tags/v1.0.69^{}` for annotated tags. After sorting by version:refname, the `^{}` entry sorts after the plain tag, so `tail -1` picks it up and `awk` extracts `v1.0.69^{}` — an invalid version string that corrupts the download URL and causes all VERSION=prerelease installs to fail with a 404. AI-Generated: true --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 install.sh diff --git a/install.sh b/install.sh old mode 100755 new mode 100644 index b63486dd..b6a6bddd --- a/install.sh +++ b/install.sh @@ -54,7 +54,7 @@ elif [ "${VERSION}" = "prerelease" ]; then echo "Error: git is required to install prerelease versions" >&2 exit 1 fi - VERSION="$(git ls-remote --tags --sort "version:refname" "$GIT_REMOTE" | tail -1 | awk -F/ '{print $NF}')" + VERSION="$(git ls-remote --tags --refs --sort "version:refname" "$GIT_REMOTE" | tail -1 | awk -F/ '{print $NF}')" if [ -z "$VERSION" ]; then echo "Error: Could not determine prerelease version" >&2 exit 1