warrensbox/terraform-switcher

Cannot get list from mirror: https://releases.hashicorp.com/terraform

Closed this issue · 6 comments

tfswitch -v
Version: 0.13.1250

tfswitch -l
Cannot get list from mirror: https://releases.hashicorp.com/terraform
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Terraform version:
▸ 1.1.7 *recent
1.2.1 *recent
0.15.4 *recent

Happens for me as well on v 0.13.1221 & latest - 0.13.1250

same here, it worked yesterday 🤷🏻‍♂️

tfswitch -v

Version: 0.13.1250

Reading required version from terraform file
Cannot get list from mirror: https://releases.hashicorp.com/terraform
Reading required version from constraint: ~> 1.1.9
Version does not exist or invalid terraform version format.
 Format should be #.#.# or #.#.#-@# where # are numbers and @ are word characters.
 For example, 0.11.7 and 0.11.9-beta1 are valid versions
error parsing constraint: ~> 1.1.9
No version found to match constraint. Follow the README.md instructions for setup. https://github.com/warrensbox/terraform-switcher/blob/master/README.md

Just opened a PR that fixes this. It appears hashicorp has changed their endpoint slightly.

@warrensbox @jukie It looks like Hashicorp keeps changing HTML output occasionally — should we look into releasing 0.14 rather sooner than later to stop tfswitch from getting broken because of HTML changes? 🤔

jukie commented

My jfrog trial expired so I wasn't able to rework support for mirrors yet. I'd prefer merging a fix for this on 0.13 first while we sort that out.

Can verify that PR #251 seems to fix this. Would be nice if hashicorp would stop changing their download URLs.