diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a84a5392..6195fc210 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: uses: robinraju/release-downloader@v1.10 with: repository: 'MetaCubeX/mihomo' - tag: "v1.18.3" + tag: "v1.18.4" fileName: ".*darwin.*64-v.*.gz" # releaseId: "62870807" diff --git a/ClashX/General/AlphaMetaDownloader.swift b/ClashX/General/AlphaMetaDownloader.swift index dff8ac6af..9e642ebc4 100644 --- a/ClashX/General/AlphaMetaDownloader.swift +++ b/ClashX/General/AlphaMetaDownloader.swift @@ -80,8 +80,12 @@ class AlphaMetaDownloader: NSObject { Promise { resolver in let assetName = assetName() AF.request("https://api.github.com/repos/MetaCubeX/mihomo/releases/tags/Prerelease-Alpha").responseDecodable(of: ReleasesResp.self) { - guard let assets = $0.value?.assets, - let assetName, + guard let assets = $0.value?.assets else { + resolver.reject(errors.downloadFailed) + return + } + + guard let assetName, let asset = assets.first(where: { $0.name.contains(assetName) && !$0.name.contains("cgo") &&