Skip to content

Commit

Permalink
Fix the arch check of jq in Mac M1 environment
Browse files Browse the repository at this point in the history
- No official arm64 build for now but the current amd64 binary works for the M1 env, should change to the arm64 binary once jq has official arm64 version in its Github release.
- Reference Github issue: jqlang/jq#2386

Signed-off-by: HungWei Chiu <[email protected]>
  • Loading branch information
hwchiu committed Apr 3, 2022
1 parent c50de9b commit e202577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,11 @@ func Test_DownloadJq(t *testing.T) {
arch: arch64bit,
url: prefix + "jq-osx-amd64",
},
{
os: "darwin",
arch: "arm64",
url: prefix + "jq-osx-amd64",
},
{
os: "linux",
arch: arch64bit,
Expand Down
2 changes: 2 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ helmfile_{{$os}}_{{$arch}}{{$ext}}`,
{{- if eq .Arch "x86_64" -}}
{{$arch = "64"}}
{{- else if eq .Arch "arm64" -}}
{{$arch = "64"}}
{{- else -}}
{{$arch = "32"}}
{{- end -}}
Expand Down

0 comments on commit e202577

Please sign in to comment.