Skip to content

Commit

Permalink
Fix bug in regex for darwin arm64->amd64 workaround
Browse files Browse the repository at this point in the history
The previous regex matched `0..` instead of `0.1.2`
  • Loading branch information
bryanhiestand authored and Zordrak committed Dec 19, 2023
1 parent 6bbd3ec commit c12a0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/tfenv-install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c12a0ad

Please sign in to comment.