Skip to content

Commit

Permalink
Log process.arch
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonGrodin committed Sep 1, 2024
1 parent 6c988a6 commit 08ed1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function defaultBits(version) {
function getArchitecture(version, armAllowed = false) {
switch (process.platform) {
case "darwin":
core.debug(`process.arch = ${process.arch}`);
return defaultBits(version) == 32 ? "x86" :
armAllowed && process.arch.startsWith("arm") ? "arm64" : "amd64";
case "linux":
Expand All @@ -72,7 +73,7 @@ function acquireNJGitHub(version) {
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 downloadUrl = util.format("https://smlnj.org/dist/working/%s/%s", version, filename);
core.debug("Downloading SML/NJ from: " + downloadUrl);
core.debug(`Downloading SML/NJ from: ${downloadUrl}`);
try {
yield tc.downloadTool(downloadUrl, path.join("smlnj", filename));
}
Expand Down
3 changes: 2 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function defaultBits(version: string): 32 | 64 {
function getArchitecture(version: string, armAllowed: boolean = false): string {
switch (process.platform) {
case "darwin":
core.debug(`process.arch = ${process.arch}`);
return defaultBits(version) == 32 ? "x86" :
armAllowed && process.arch.startsWith("arm") ? "arm64" : "amd64";
case "linux":
Expand All @@ -66,7 +67,7 @@ async function acquireNJGitHub(version: string): Promise<string> {
filename
);

core.debug("Downloading SML/NJ from: " + downloadUrl);
core.debug(`Downloading SML/NJ from: ${downloadUrl}`);

try {
await tc.downloadTool(downloadUrl, path.join("smlnj", filename));
Expand Down

0 comments on commit 08ed1ef

Please sign in to comment.