Skip to content

Commit

Permalink
Correctly handle ARM64 release updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed May 11, 2023
1 parent d004288 commit 3fb78c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion JL.Core/Network/Networking.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Runtime.InteropServices;
using System.Text.Json;
using JL.Core.Utilities;

Expand Down Expand Up @@ -29,7 +30,10 @@ public static async Task CheckForJLUpdates(bool isAutoCheck)
if (latestJLVersion > Utils.JLVersion)
{
bool foundRelease = false;
string architecture = Environment.Is64BitProcess ? "x64" : "x86";
string architecture = RuntimeInformation.ProcessArchitecture is Architecture.Arm64
? "arm64"
: Environment.Is64BitProcess ? "x64" : "x86";

JsonElement assets = jsonDocument.RootElement.GetProperty("assets");

foreach (JsonElement asset in assets.EnumerateArray())
Expand Down

0 comments on commit 3fb78c3

Please sign in to comment.