From b1f190bdc5464de58d450bb06df0699e5c542345 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Wed, 23 Oct 2024 14:14:37 +0100 Subject: [PATCH] Fix for docker-compose on arm64 Darwin Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- pkg/get/get_test.go | 5 +++++ pkg/get/tools.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/pkg/get/get_test.go b/pkg/get/get_test.go index 19921efd3..154afe016 100644 --- a/pkg/get/get_test.go +++ b/pkg/get/get_test.go @@ -1846,6 +1846,11 @@ func Test_DownloadDockerCompose(t *testing.T) { version: toolVersion, url: `https://github.com/docker/compose/releases/download/v2.3.4/docker-compose-darwin-x86_64`, }, + {os: "darwin", + arch: archDarwinARM64, + version: toolVersion, + url: `https://github.com/docker/compose/releases/download/v2.3.4/docker-compose-darwin-aarch64`, + }, {os: "linux", arch: archARM7, version: toolVersion, diff --git a/pkg/get/tools.go b/pkg/get/tools.go index a8c83bb38..7f50d5b80 100644 --- a/pkg/get/tools.go +++ b/pkg/get/tools.go @@ -1419,6 +1419,9 @@ https://github.com/inlets/inletsctl/releases/download/{{.Version}}/{{$fileName}} {{- end }} {{- else if eq .OS "darwin" -}} {{$osStr = "darwin"}} +{{- if eq .Arch "arm64" -}} +{{ $arch = "aarch64"}} +{{- end -}} {{- end -}} {{$ext := ""}} {{ if HasPrefix .OS "ming" -}}