Skip to content

Commit

Permalink
arm64 on darwin is available for go1.16 or newer
Browse files Browse the repository at this point in the history
Fixes the error message that is printed
if you request Go < 1.16 on darwin/arm64.
  • Loading branch information
abhinav committed Feb 6, 2024
1 parent 10f140b commit d529375
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gimme
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,14 @@ case "${GIMME_ARCH}" in
x86_64) GIMME_ARCH=amd64 ;;
x86) GIMME_ARCH=386 ;;
arm64)
if [[ "${GIMME_GO_VERSION}" != master && "$(_versint "${GIMME_GO_VERSION}")" < "$(_versint 1.5)" ]]; then
min_arm64_version=1.5
if [[ "${GIMME_HOSTOS}" == 'darwin' ]]; then
min_arm64_version=1.16
fi

if [[ "${GIMME_GO_VERSION}" != master && "$(_versint "${GIMME_GO_VERSION}")" < "$(_versint "$min_arm64_version")" ]]; then
echo >&2 "error: ${GIMME_ARCH} is not supported by this go version"
echo >&2 "try go1.5 or newer"
echo >&2 "try go${min_arm64_version} or newer"
exit 1
fi
if [[ "${GIMME_HOSTOS}" == "linux" && "${GIMME_HOSTARCH}" != "${GIMME_ARCH}" ]]; then
Expand Down

0 comments on commit d529375

Please sign in to comment.