From e332434802140425ea14dc68d89bede0483c09cf Mon Sep 17 00:00:00 2001 From: master3395 Date: Wed, 4 Feb 2026 22:05:16 +0100 Subject: [PATCH] Fix dev branch detection: use curl -L so GitHub archive 302 redirect is followed and v2.5.5-dev is recognized as available --- cyberpanel.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cyberpanel.sh b/cyberpanel.sh index 5c19974fe..4607b698f 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -789,18 +789,18 @@ except: echo "Downloading from: https://raw.githubusercontent.com/master3395/cyberpanel/v2.5.5-dev/cyberpanel.sh" # First, try to download the repository archive to get the correct installer - # GitHub: branch archives use refs/heads/BRANCH; tag archives use refs/tags/TAG or /TAG + # GitHub: branch archives use refs/heads/BRANCH; GitHub returns 302 redirect to codeload, so we must use -L local archive_url="" local installer_url="https://raw.githubusercontent.com/master3395/cyberpanel/v2.5.5-dev/cyberpanel.sh" - if curl -s --head "https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then + if curl -s -L --head "https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then archive_url="https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" echo " Using development branch (v2.5.5-dev) from master3395/cyberpanel" - elif curl -s --head "https://github.com/master3395/cyberpanel/archive/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then + elif curl -s -L --head "https://github.com/master3395/cyberpanel/archive/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then archive_url="https://github.com/master3395/cyberpanel/archive/v2.5.5-dev.tar.gz" echo " Using development branch (v2.5.5-dev) from master3395/cyberpanel" else echo " Development branch archive not available, trying installer script directly..." - if ! curl -s --head "$installer_url" | grep -q "200 OK"; then + if ! curl -s -L --head "$installer_url" | grep -q "200 OK"; then echo " Development branch not available, falling back to stable" installer_url="https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel.sh" archive_url="https://github.com/master3395/cyberpanel/archive/stable.tar.gz"