Skip to content

Commit

Permalink
Merge pull request #419 from tfutils/revert-397-master
Browse files Browse the repository at this point in the history
Revert "Do not check the release list if a Terraform is already installed (fixes #395)"
  • Loading branch information
Zordrak authored Dec 19, 2023
2 parents 8c0f86b + c14ab32 commit a14e553
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libexec/tfenv-install
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ declare regex="${resolved##*\:}";

log 'debug' "Processing install for version ${version}, using regex ${regex}";

remote_version="$(tfenv-list-remote | grep -e "${regex}" | head -n 1)";
[ -n "${remote_version}" ] && version="${remote_version}" || log 'error' "No versions matching '${requested:-$version}' found in remote";

dst_path="${TFENV_CONFIG_DIR}/versions/${version}";
if [ -f "${dst_path}/terraform" ]; then
echo "Terraform v${version} is already installed";
exit 0;
fi;

remote_version="$(tfenv-list-remote | grep -e "${regex}" | head -n 1)";
[ -n "${remote_version}" ] && version="${remote_version}" || log 'error' "No versions matching '${requested:-$version}' found in remote";

case "$(uname -s)" in
Darwin*)
kernel="darwin";
Expand Down

0 comments on commit a14e553

Please sign in to comment.