From c12a0ad11f280b3789bf157349f34b2ef15f4db2 Mon Sep 17 00:00:00 2001 From: Bryan Hiestand Date: Sat, 24 Jun 2023 00:54:13 -0700 Subject: [PATCH] Fix bug in regex for darwin arm64->amd64 workaround The previous regex matched `0..` instead of `0.1.2` --- libexec/tfenv-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/tfenv-install b/libexec/tfenv-install index d13b384..4d331ae 100755 --- a/libexec/tfenv-install +++ b/libexec/tfenv-install @@ -124,7 +124,7 @@ case "$(uname -m)" in ;; "darwin") # No Apple Silicon builds before 1.0.2 - if [[ "${version}" =~ 0\..+$ || "${version}" =~ 1\.0\.0|1$ + if [[ "${version}" =~ ^0\.[0-9]+\.[0-9]+$ || "${version}" =~ ^1\.0\.[0-1]$ ]]; then TFENV_ARCH="${TFENV_ARCH:-amd64}"; else