$ echo 'min-required' > .terraform-version
$ terraform init
version 'min-required' is not installed (set by [...]/.terraform-version). Installing now as TFENV_AUTO_INSTALL==true
Terraform v1.0.0 is already installed
/opt/tfenv/libexec/tfenv-exec: line 105: /var/lib/tfenv/versions/min-required/terraform: No such file or directory
I think there's two problems here with when 'min-required' is evaluated:
it's thought (presumably always) not to be installed, and tries to install; at which point in this case its value was already installed;
it's again not evaluated in (or in the call to) tfenv-exec, so it tries to find the terraform binary in a min-required dir that will never exist
I think there's two problems here with when 'min-required' is evaluated:
tfenv-exec
, so it tries to find theterraform
binary in amin-required
dir that will never exist