Skip to content

Commit

Permalink
detect aarch64 architecture (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
amircodota authored Jan 14, 2021
1 parent 10aef3a commit 5d3ecfc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/com/tabnine/general/StaticConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ public static boolean shouldTryStartingBinary(int attempt) {
}

private static String getDistributionName() {
String is32or64 = SystemInfo.is32Bit ? "i686" : "x86_64";
String arch = SystemInfo.is32Bit ? "i686" : "x86_64";
if ("aarch64".equals(System.getProperty("os.arch"))) {
arch = "aarch64";
}

String platform;

if (SystemInfo.isWindows) {
Expand All @@ -117,7 +121,7 @@ private static String getDistributionName() {
throw new RuntimeException("Platform was not recognized as any of Windows, macOS, Linux, FreeBSD");
}

return is32or64 + "-" + platform;
return arch + "-" + platform;
}

public static Path getBaseDirectory() {
Expand Down

0 comments on commit 5d3ecfc

Please sign in to comment.