Skip to content

Commit

Permalink
Fix invalid argument to head on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
OJFord authored and Zordrak committed Oct 1, 2022
1 parent c568997 commit 699f998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/tfenv-resolve-version
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if [[ "${version_requested}" =~ ^latest-allowed$ ]]; then
version_requested="${version_num}";
;;
'~>'*)
version_without_rightmost="$(echo "${version_num}" | sed 's/\./\n./g' | head -n -1 | xargs -I@ echo -n @)";
version_without_rightmost="$(echo "${version_num}" | rev | cut -d. -f2- | rev)";
version_requested="latest:^${version_without_rightmost}";
;;
*)
Expand Down

0 comments on commit 699f998

Please sign in to comment.