feat(detect): add --no-fallback option#539
Merged
kvendingoldo merged 2 commits intotofuutils:mainfrom Feb 11, 2026
Merged
Conversation
Signed-off-by: railgun-0402 <april-life.f-441-2011@docomo.ne.jp>
ca92664 to
8f6d842
Compare
Collaborator
|
Hi! Thank you for PR! |
Signed-off-by: railgun-0402 <april-life.f-441-2011@docomo.ne.jp>
3b42a84 to
88228d6
Compare
kvendingoldo
approved these changes
Feb 11, 2026
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Feb 15, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [tofuutils/tenv](https://github.com/tofuutils/tenv) | patch | `v4.9.1` → `v4.9.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>tofuutils/tenv (tofuutils/tenv)</summary> ### [`v4.9.3`](https://github.com/tofuutils/tenv/releases/tag/v4.9.3) [Compare Source](tofuutils/tenv@v4.9.2...v4.9.3) #### Changelog - [`c35ca9b`](tofuutils/tenv@c35ca9b) Merge pull request [#​539](tofuutils/tenv#539) from railgun-0402/feat/no-fallback-detect - [`88228d6`](tofuutils/tenv@88228d6) chore: trigger CI - [`8f6d842`](tofuutils/tenv@8f6d842) feat(detect): add --no-fallback option ### [`v4.9.2`](https://github.com/tofuutils/tenv/releases/tag/v4.9.2) [Compare Source](tofuutils/tenv@v4.9.1...v4.9.2) #### Changelog - [`5af2b17`](tofuutils/tenv@5af2b17) Merge pull request [#​542](tofuutils/tenv#542) from pcjedi/patch-2 - [`0098502`](tofuutils/tenv@0098502) chore: bump alpine from 3.20 to 3.23 - [`439d860`](tofuutils/tenv@439d860) Merge pull request [#​538](tofuutils/tenv#538) from tofuutils/dependabot/github\_actions/docker/login-action-3.7.0 - [`9006535`](tofuutils/tenv@9006535) gh-actions: bump docker/login-action from 3.6.0 to 3.7.0 - [`e76e7a8`](tofuutils/tenv@e76e7a8) Merge pull request [#​533](tofuutils/tenv#533) from tofuutils/dependabot/github\_actions/actions/setup-go-6.2.0 - [`cf3b354`](tofuutils/tenv@cf3b354) gh-actions: bump actions/setup-go from 6.1.0 to 6.2.0 - [`4f0da9d`](tofuutils/tenv@4f0da9d) Merge pull request [#​531](tofuutils/tenv#531) from tofuutils/dependabot/go\_modules/github.com/BurntSushi/toml-1.6.0 - [`4c3488a`](tofuutils/tenv@4c3488a) Merge pull request [#​535](tofuutils/tenv#535) from tofuutils/dependabot/github\_actions/actions/checkout-6.0.2 - [`33e5088`](tofuutils/tenv@33e5088) fix: readme bundle - [`c21950b`](tofuutils/tenv@c21950b) gh-actions: bump actions/checkout from 6.0.1 to 6.0.2 - [`2fc928f`](tofuutils/tenv@2fc928f) go: bump github.com/BurntSushi/toml from 1.5.0 to 1.6.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMC4zIiwidXBkYXRlZEluVmVyIjoiNDMuMTAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6OnBhdGNoIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--no-fallbackflag totenv tofu detectandtenv tf detectcommandsMotivation
Closes #502
Users need to distinguish whether a folder is configured for OpenTofu or Terraform. Currently,
tenv tofu detectandtenv tf detectreturn exit code 0 even when no version files are found, becausea fallback mechanism triggers to select a default version.
Changes
versionmanager/manager.go: AddErrNoVersionFilesFounderror andResolveStrict()methodcmd/tenv/subcmd.go: Add--no-fallbackflag to detect commandversionmanager/proxy/proxy.go: UpdateDetect()call signatureversionmanager/tenvlib/lib.go: UpdateDetect()call signatureTest plan