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
We used to set TF_VERSION env variable and used this as the fallback (in fact, this is how my projects Terrareg/Terrarun use it).
Now, however, it's the highest priority (excluding CMD arguments)!
Since, historically, the env variable was really treated as overriding the default-version argument, not the actual version flag.
I guess this was broken in the main parameters refactoring (a couple of releases ago) (https://github.com/warrensbox/terraform-switcher/pull/356/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261L149)
I think the correct answer, is to add a new env variable for TF_DEFAULT_VERSION and maybe TOML config for this, which will override the params.DefaultVersion...
I think we'd need to check params.Version at the end of populateParams and, if empty, set to DefaultVersion.
The text was updated successfully, but these errors were encountered:
We used to set TF_VERSION env variable and used this as the fallback (in fact, this is how my projects Terrareg/Terrarun use it).
Now, however, it's the highest priority (excluding CMD arguments)!
Since, historically, the env variable was really treated as overriding the default-version argument, not the actual version flag.
I guess this was broken in the main parameters refactoring (a couple of releases ago) (https://github.com/warrensbox/terraform-switcher/pull/356/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261L149)
I think the correct answer, is to add a new env variable for TF_DEFAULT_VERSION and maybe TOML config for this, which will override the
params.DefaultVersion
...I think we'd need to check
params.Version
at the end ofpopulateParams
and, if empty, set toDefaultVersion
.The text was updated successfully, but these errors were encountered: