fix a bug

This commit is contained in:
BROBIRD
2026-06-02 01:40:48 +08:00
parent 5af7247d76
commit 86cea74b26

View File

@@ -34,15 +34,15 @@ jobs:
echo "Attempt $i/$MAX_RETRIES to download mihomo..."
if TAG=$(curl -s --fail https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'); then
echo "Latest mihomo version: $TAG"
if curl -L --fail -o mihomo.tar.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.tar.gz"; then
if curl -L --fail -o mihomo.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.gz"; then
echo "Download succeeded"
if tar -xzf mihomo.tar.gz; then
if gzip -d mihomo.gz; then
chmod +x mihomo
rm -f mihomo.tar.gz
rm -f mihomo.gz
echo "mihomo extracted and ready"
exit 0
else
echo "Failed to extract mihomo.tar.gz"
echo "Failed to extract mihomo.gz"
fi
else
echo "Download failed (HTTP error)"