Skip to content

Commit

Permalink
Merge branch 'master' into fix_ls_macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Zordrak authored May 27, 2020
2 parents a2fea2e + 5d94b99 commit 6a877b8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions libexec/tfenv-list-remote
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ fi

TFENV_REMOTE="${TFENV_REMOTE:-https://releases.hashicorp.com}"
log 'debug' "TFENV_REMOTE: ${TFENV_REMOTE}";
declare remote_versions="$(curlw -sf "${TFENV_REMOTE}/terraform/")";

declare remote_versions;
remote_versions="$(curlw -sSf "${TFENV_REMOTE}/terraform/")" \
|| log 'error' "Failed to download remote versions from ${TFENV_REMOTE}/terraform/";

#log 'debug' "Remote versions available: ${remote_versions}"; # Even in debug mode this is too verbose
curlw -sf "${TFENV_REMOTE}/terraform/" \
| grep -o -E "[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta|alpha|oci)[0-9]*)?" \
| uniq;

grep -o -E "[0-9]+\.[0-9]+\.[0-9]+(-(rc|beta|alpha|oci)[0-9]*)?" <<<"${remote_versions}" | uniq;

0 comments on commit 6a877b8

Please sign in to comment.