Skip to content

Commit

Permalink
Fix tfutils#300: min-required not evaluated for auto-install
Browse files Browse the repository at this point in the history
  • Loading branch information
OJFord committed Jul 11, 2022
1 parent a7fba52 commit 1eaac2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tfenv-version-name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ function tfenv-version-name() {
log 'error' "Version could not be resolved (set by ${TFENV_VERSION_SOURCE} or tfenv use <version>)";
fi;

if [[ "${TFENV_VERSION}" == min-required ]]; then
TFENV_VERSION="$(tfenv-min-required)";
fi;

if [[ ! -d "${TFENV_CONFIG_DIR}/versions/${TFENV_VERSION}" ]]; then
log 'debug' "version '${TFENV_VERSION}' is not installed (set by ${TFENV_VERSION_SOURCE})";
fi;
Expand Down

0 comments on commit 1eaac2b

Please sign in to comment.