diff --git a/lib/installer.js b/lib/installer.js index 34e8281..eba5e81 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -56,12 +56,10 @@ function acquireNJ(version) { function defaultBits(version) { return semver.satisfies(format(version), ">=110.98") ? 64 : 32; } -function getArchitecture(version, armAllowed = false) { +function getArchitecture(version) { switch (process.platform) { case "darwin": - core.debug(`process.arch = ${process.arch}`); - return defaultBits(version) == 32 ? "x86" : - armAllowed && process.arch.startsWith("arm") ? "arm64" : "amd64"; + return defaultBits(version) == 32 ? "x86" : "amd64"; case "linux": return "amd64"; default: @@ -71,7 +69,7 @@ function getArchitecture(version, armAllowed = false) { function acquireNJGitHub(version) { return __awaiter(this, void 0, void 0, function* () { yield exec.exec("git", ["clone", "--depth", "1", "--branch", "v" + version, "--recurse-submodules", "https://github.com/smlnj/smlnj.git"]); - let filename = util.format("boot.%s-unix.tgz", getArchitecture(version, true)); + let filename = util.format("boot.%s-unix.tgz", getArchitecture(version)); let downloadUrl = util.format("https://smlnj.org/dist/working/%s/%s", version, filename); core.debug(`Downloading SML/NJ from: ${downloadUrl}`); try { diff --git a/src/installer.ts b/src/installer.ts index 5eea240..be17763 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -42,12 +42,10 @@ function defaultBits(version: string): 32 | 64 { return semver.satisfies(format(version), ">=110.98") ? 64 : 32; } -function getArchitecture(version: string, armAllowed: boolean = false): string { +function getArchitecture(version: string): string { switch (process.platform) { case "darwin": - core.debug(`process.arch = ${process.arch}`); - return defaultBits(version) == 32 ? "x86" : - armAllowed && process.arch.startsWith("arm") ? "arm64" : "amd64"; + return defaultBits(version) == 32 ? "x86" : "amd64"; case "linux": return "amd64"; default: @@ -59,7 +57,7 @@ function getArchitecture(version: string, armAllowed: boolean = false): string { async function acquireNJGitHub(version: string): Promise { await exec.exec("git", ["clone", "--depth", "1", "--branch", "v" + version, "--recurse-submodules", "https://github.com/smlnj/smlnj.git"]); - let filename: string = util.format("boot.%s-unix.tgz", getArchitecture(version, true)) + let filename: string = util.format("boot.%s-unix.tgz", getArchitecture(version)) let downloadUrl: string = util.format( "https://smlnj.org/dist/working/%s/%s",