Fixes #350. I've changed the order of the uname -s and uname -m steps in order to make this work. As such, I've created a new variable, kernel, that is set during the uname -scase statement. kernel is then used when setting TFENV_ARCH when aarch-64 | arm64 is found, and also later when setting the os variable. Hope it makes sense.
I've checked this against the current tfenv installed on my machine (version 3.0.0, installed via brew), and it works where the current version fails (tfenv == 3.0.0, tfenv-deniz == this branch):
$ tfenv install 0.11.15
Installing Terraform v0.11.15
Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.15/terraform_0.11.15_darwin_arm64.zip
curl: (22) The requested URL returned error: 404
Tarball download failed
$ tfenv-deniz install 0.11.15
Installing Terraform v0.11.15
Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.15/terraform_0.11.15_darwin_amd64.zip
############################################################################################# 100.0%
...
Fixes #350. I've changed the order of the
uname -s
anduname -m
steps in order to make this work. As such, I've created a new variable,kernel
, that is set during theuname -s
case
statement.kernel
is then used when settingTFENV_ARCH
whenaarch-64 | arm64
is found, and also later when setting theos
variable. Hope it makes sense.I've checked this against the current
tfenv
installed on my machine (version 3.0.0, installed via brew), and it works where the current version fails (tfenv
== 3.0.0,tfenv-deniz
== this branch):