tfutils / tfenv

Terraform version manager
MIT License
4.52k stars 454 forks source link

Properly handle invalid version download #105

Closed marceloboeira closed 5 years ago

marceloboeira commented 5 years ago
[master] λ tfenv install 0.12.0                                                                                                                                          
[INFO] Installing Terraform v0.12.0
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_darwin_amd64.zip

curl: (22) The requested URL returned error: 403 Forbidden
tfenv: tfenv-install: [ERROR] Tarball download failed
iamhsa commented 5 years ago

@marceloboeira : As version 0.12.0 not yet exist why want to install it ?

$ tfenv list-remote | grep '0.12'
0.12.0-beta1
0.12.0-alpha4
0.12.0-alpha3
0.12.0-alpha2
0.12.0-alpha1

On my side (Linux) I don't have the same error

$ tfenv install 0.12.0
tfenv: tfenv-install: [ERROR] No versions matching '0.12.0' found in remote

$ tfenv --version
tfenv 0.6.0-16-g4475b71
marceloboeira commented 5 years ago

@iamhsa I've updated the title/description...

iamhsa commented 5 years ago

@marceloboeira could you give us more information like, OS used and tfenv version. As you can see in my previous post, it seems to me that I don't have the same behaviour, with the latest master branch.

marceloboeira commented 5 years ago

I've installed it with homebrew, on macOS, the version is tfenv 0.6.0.

iamhsa commented 5 years ago

This issue has been fixed by #102. I think the homebrew package does not include this fix because there is no new release since (I suppose ... I am not a mac user) Perhaps maintainer will make it soon.

marceloboeira commented 5 years ago

Great, I'll close the issue then!