Skip to content

Commit ad3a7e7

Browse files
committed
Add graceful fail for min-required
Even when setting `TFENV_TERRAFORM_VERSION` to `min-required`, we might prefer to fallback on the normal inference method rather than a hard fail. Resolves tfutils#353
1 parent 1ccfddb commit ad3a7e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/tfenv-version-name.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ function tfenv-version-name() {
3333
TFENV_VERSION="${potential_min_required}" \
3434
TFENV_VERSION_SOURCE='terraform{required_version}';
3535
else
36-
log 'error' 'Specifically asked for min-required via terraform{required_version}, but none found';
36+
log 'debug' 'Specifically asked for min-required via terraform{required_version}, but none found, falling back to normal detection';
37+
TFENV_TERRAFORM_VERSION="";
38+
echo $(tfenv-version-name);
3739
fi;
3840
fi;
3941

0 commit comments

Comments
 (0)