Skip to content

Commit

Permalink
Parse the output of uname to determine the architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
vasilmkd committed May 29, 2021
1 parent 05b368d commit 6e488c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ function jabbaUrlSuffix(): string {
const runnerOs = shell.env["RUNNER_OS"] || "undefined";
switch (runnerOs.toLowerCase()) {
case "linux":
const arch = shell.exec("uname -m", { silent: true }).stdout;
switch (arch) {
case "x86_64":
return "linux-amd64";

case "arm64":
case "aarch64":
return "linux-arm64";
}
return "linux-amd64";
case "macos":
return "darwin-amd64";
Expand Down

0 comments on commit 6e488c4

Please sign in to comment.