Skip to content

feat: support .tool-versions (asdf format) in tofu_version_file - #131

Merged
yottta merged 2 commits into
opentofu:mainfrom
somaz94:feat/tool-versions-support
Jul 10, 2026
Merged

yottta merged 2 commits into
opentofu:mainfrom
somaz94:feat/tool-versions-support

Conversation

@somaz94

@somaz94 somaz94 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Extends the existing tofu_version_file input to also accept an asdf-format .tool-versions file: the opentofu <version> line is used and other tool entries are ignored. A single-line .opentofu-version file keeps working unchanged (the parser falls back to the trimmed file content when no opentofu line is present).

This revives the minimal approach from the earlier #118, which was closed before the feature was accepted in #40.

Validation (local):

  • npm test: semistandard lint clean, jest 43/43 pass (incl. a new .tool-versions test)
  • npm run build: dist/index.js regenerated, diff limited to the parser change

closes: #40

Signed-off-by: somaz <genius5711@gmail.com>
somaz94 added a commit to somaz94/somaz94 that referenced this pull request Jul 3, 2026
@somaz94
somaz94 marked this pull request as ready for review July 10, 2026 02:54
@somaz94
somaz94 requested a review from a team as a code owner July 10, 2026 02:54
Comment thread lib/setup-tofu.js
Signed-off-by: somaz <genius5711@gmail.com>
@somaz94
somaz94 force-pushed the feat/tool-versions-support branch from f45554e to b205273 Compare July 10, 2026 09:18
@yottta
yottta merged commit 37a417e into opentofu:main Jul 10, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.tool-versions support

3 participants