tfenv v3.1.0
First release since v3.0.0 (July 2022).
New Features
latest-allowedversion resolution fromrequired_versionconstraints in Terraform files, supporting=,>=,>,<=, and~>operatorsTFENV_SKIP_REMOTE_CHECKto skip checking remote versions before installing- Per-version file locking to prevent concurrent install races (#422)
- Conditional bashlog loading based on shell interactivity via
TFENV_BASHLOG(#229) - Custom remote compatibility for Artifactory and similar mirrors
- Dockerfile for containerised usage and end-to-end testing
Bug Fixes
- Filter pre-release versions from
latestresolution; uselatest:(with colon) or alphabetic regex to include pre-releases (#375, #204) - CLI argument takes precedence over
TFENV_TERRAFORM_VERSIONfor install (#441) - Route tfenv log output to stderr in terraform shim context (#374)
- Do not assume brew is available for GNU grep detection (#442)
- Operator precedence bug and unbound variable in version-name resolution (#406, #431)
- Shell quoting fixes: trap word-splitting (#455), curl paths with spaces (#454), exec argument iteration (#453)
- Stray closing paren in syslog tag (#451), dead code removal (#452, #460)
- Fix
realpathnot available on macOS - Fix use of
-chdirwith absolute paths (#354) - Handle different line endings in
.terraform-versionfiles - Windows OS selection with underscore handling for Cygwin-like tools
- Darwin arm64/amd64 regex workaround fix
- macOS architecture selection for TFENV_ARCH
- Replace use of
revfor Windows compatibility - Fix latest-allowed version matching for partial versions
- Fix legacy
ENVsyntax in Dockerfile - Various documentation fixes and README improvements
Test Coverage
Complete test coverage overhaul — 13 test suites (7 new), zero failures across Ubuntu and macOS:
- commands, list-remote, pin, version-file resolution, pre-release filtering, environment variables, resolve-version
Full Changelog
See CHANGELOG.md for complete details with contributor attribution.