Skip to content

Commit

Permalink
Update tfenv-min-required (tfutils#235)
Browse files Browse the repository at this point in the history
Co-authored-by: Zordrak <[email protected]>
  • Loading branch information
tskinn and Zordrak authored Feb 6, 2021
1 parent edcb0fc commit c977371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/tfenv-min-required
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ find_min_required() {
local root="${1}";

# Only grep recursively if we cannot a required version in base of directory
versions="$(grep -h required_version --include '*tf' "${root}"/* || grep -h -R required_version --include '*tf' "${root}"/* | grep -o '\([0-9]\+\.\?\)\{2,3\}\(-[a-z]\+[0-9]\+\)\?')";
versions="$( echo $(grep -h required_version --include '*tf' "${root}"/* || grep -h -R required_version --include '*tf' "${root}"/*) | grep -o '\([0-9]\+\.\?\)\{2,3\}\(-[a-z]\+[0-9]\+\)\?')";

if [[ "${versions}" =~ ([~=!<>]{0,2}[[:blank:]]*[0-9]+[0-9.]+)[^0-9]*(-[a-z]+[0-9]+)? ]]; then
found_min_required="${BASH_REMATCH[1]}${BASH_REMATCH[2]}"
Expand Down

0 comments on commit c977371

Please sign in to comment.