From 5379eaa00199f9bd69d0c21817d37c6fbc765d2a Mon Sep 17 00:00:00 2001 From: Valentin Pichard Date: Mon, 19 Apr 2021 14:53:22 +0200 Subject: [PATCH] Add darwin arch condition for envtest script Signed-off-by: Valentin Pichard --- hack/setup-envtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/setup-envtest.sh b/hack/setup-envtest.sh index 783f930d44..dbbd206352 100755 --- a/hack/setup-envtest.sh +++ b/hack/setup-envtest.sh @@ -66,8 +66,8 @@ function fetch_envtest_tools { goarch="$(go env GOARCH)" goos="$(go env GOOS)" - if [[ "$goos" != "linux" && "$goos" != "darwin" ]]; then - echo "OS '$goos' not supported. Aborting." >&2 + if [[ ("$goos" != "linux" && "$goos" != "darwin") || ("$goos" == "darwin" && "$goarch" != "amd64") ]]; then + echo "OS '$goos' with '$goarch' arch is not supported. Aborting." >&2 return 1 fi