fix(tenv): reinstall when a shim is missing - #231
Merged
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c428adb. Configure here.
chromy
force-pushed
the
chromy/2026-09-07-tenv-tofu-shim
branch
from
September 7, 2026 19:12
c428adb to
425c2c6
Compare
chromy
marked this pull request as draft
September 8, 2026 13:28
chromy
force-pushed
the
chromy/2026-09-07-tenv-tofu-shim
branch
from
September 8, 2026 13:37
425c2c6 to
cc2f18b
Compare
#230 added the `tofu` shim, but only for checkouts that don't already have the pinned tenv. install() early-returns on a version match, so an existing checkout with tenv v1.3.0 never gets the new shim — it stays broken until tenv itself is bumped. That's most of getsentry/ops, where `terragrunt run` fails outright because root.hcl sets `terraform_binary = "tofu"`: ERROR Failed to execute "tofu -version" in ... exec: "tofu": executable file not found in $PATH So check that the shims exist too, not just the version, and reinstall if any are absent. install() now converges on the shim set devenv wants rather than on whatever the first install happened to write. Also drive the extract, shim and uninstall lists from two module-level tuples. Three hand-maintained copies is what let `tofu` go missing from one of them in the first place. `tf` stays extracted but unshimmed; it picks tofu or terraform based on which version files are present, so nothing wants to invoke it by name. Adds tests/lib/test_tenv.py — this module had no coverage. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chromy
force-pushed
the
chromy/2026-09-07-tenv-tofu-shim
branch
from
September 8, 2026 13:48
cc2f18b to
ceb6f35
Compare
chromy
marked this pull request as ready for review
September 8, 2026 13:58
kenzoengineer
approved these changes
Sep 8, 2026
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.

Previously
tenv.install()checked the version of tenv - so if if a PR introduced a new shim but kept the tenvversion devenv sync would not add the new shim. This changes the code to directly check all shims are present.