You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a branch and tried to make a PR but I can't find contribution guidelines so I don't think I can push to the remote.
All it is is changing line 13 in lib/tfenv-version-name.sh
from
TFENV_VERSION="$cat "${TFENV_VERSION_FILE}" || true)"
to
TFENV_VERSION="$(sed -e '/^#/d' "${TFENV_VERSION_FILE}" || true)" \
This also strips blank lines.
The text was updated successfully, but these errors were encountered:
An alternate, maybe easier and less prone to side effects, approach would be to completely ditch .terraform-version file. See #367 for a happy path.
Then:
If TFENV_AUTO_INSTALL=true:
Is there a version requested on Terraform source code? Honor it, maybe with the help of TFENV_TERRAFORM_VERSION's value min-allowed / latest-allowed.
When Terraform source code doesn't hint a version, honor TFENV_TERRAFORM_VERSION. If TFENV_TERRAFORM_VERSION is not set, consider its default value to be latest-allowed.
If TFENV_AUTO_INSTALL=false, do nothing.
This way, just using tfenv on its default configuration will render the expected results: Terraform ends up installed and working on the highest valid version (either latest stable or the highest one as per Terraform's code constrains).
Also you can avoid tfenv automatically installing terraform as per TFENV_AUTO_INSTALL=false.
Also you can change tfenv's default version management behaviour by means of TFENV_TERRAFORM_VERSION=min-allowed.
Also you could set TFENV_TERRAFORM_VERSION to an explicit version (this usage should be discouraged: use Terraform's own required_version parameter for that.
I made a branch and tried to make a PR but I can't find contribution guidelines so I don't think I can push to the remote.
All it is is changing line 13 in lib/tfenv-version-name.sh
from
TFENV_VERSION="$cat "${TFENV_VERSION_FILE}" || true)"
to
TFENV_VERSION="$(sed -e '/^#/d' "${TFENV_VERSION_FILE}" || true)" \
This also strips blank lines.
The text was updated successfully, but these errors were encountered: