mirror of
https://github.com/dnslin/aria2bot.git
synced 2026-01-11 04:02:20 +08:00
fix(installer): 修正版本号解析以支持带下划线的版本字符串
This commit is contained in:
@@ -67,7 +67,7 @@ class Aria2Installer:
|
||||
async def download_binary(self, version: str | None = None) -> Path:
|
||||
"""下载并解压 aria2 静态二进制到 ~/.local/bin/"""
|
||||
resolved_version = version or await self.get_latest_version()
|
||||
version_name = resolved_version.lstrip("v")
|
||||
version_name = resolved_version.lstrip("v").split("_")[0]
|
||||
archive_name = f"aria2-{version_name}-static-linux-{self.arch}.tar.gz"
|
||||
download_url = (
|
||||
f"https://github.com/P3TERX/Aria2-Pro-Core/releases/download/"
|
||||
|
||||
Reference in New Issue
Block a user