Update UpdateService.cs

This commit is contained in:
xujie86 2026-04-15 02:19:17 +08:00 committed by GitHub
parent 6f3587d0ee
commit d920e3018d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -299,15 +299,22 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
return url;
}
else if (Utils.IsLinux())
{
return RuntimeInformation.ProcessArchitecture switch
var arch = RuntimeInformation.ProcessArchitecture;
if (arch.ToString().Equals("RiscV64", StringComparison.OrdinalIgnoreCase))
{
return coreInfo?.DownloadUrlLinuxRiscV64;
}
return arch switch
{
Architecture.Arm64 => coreInfo?.DownloadUrlLinuxArm64,
Architecture.X64 => coreInfo?.DownloadUrlLinux64,
_ => null,
};
}
else if (Utils.IsMacOS())
{
return RuntimeInformation.ProcessArchitecture switch