From 5cefe15f6a977bc30198eb0d96be79824e557487 Mon Sep 17 00:00:00 2001 From: NixReaper Date: Sat, 25 Apr 2026 09:26:56 -0500 Subject: [PATCH] fix: make git clone fallback explicitly use main branch The releases API returns 404 when no releases exist, causing the installer to fall back to 'main'. However, the fallback clone was not explicitly specifying a branch, which could cause issues if the repository's default branch configuration is in an inconsistent state. Now the fallback clone also explicitly uses --branch main to ensure consistent behavior. --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8eceee9..3de2a68 100644 --- a/install.sh +++ b/install.sh @@ -182,9 +182,11 @@ if ! step_done "source"; then git -C "$SRC_DIR" fetch --tags --quiet git -C "$SRC_DIR" checkout "$LATEST_TAG" --quiet else + # Try with explicit branch first, then fallback to explicit 'main' branch git clone --depth 1 --branch "$LATEST_TAG" \ "https://github.com/${GITHUB_REPO}.git" "$SRC_DIR" 2>/dev/null \ - || git clone --depth 1 "https://github.com/${GITHUB_REPO}.git" "$SRC_DIR" + || git clone --depth 1 --branch main \ + "https://github.com/${GITHUB_REPO}.git" "$SRC_DIR" fi mark_done "source" fi