test: add coverage for sh: vars with included Taskfiles by JonZeolla · Pull Request #2731 · go-task/task
Navigation Menu
{{ message }}
- Notifications You must be signed in to change notification settings
- Fork 811
Open
JonZeolla wants to merge 1 commit intogo-task:mainfrom
Open
test: add coverage for sh: vars with included Taskfiles#2731
JonZeolla wants to merge 1 commit intogo-task:mainfrom
test: add coverage for sh: vars with included Taskfiles#2731
JonZeolla wants to merge 1 commit intogo-task:mainfrom
Conversation
Copy link Copy Markdown
Contributor
JonZeolla
commented
Mar 9, 2026
JonZeolla
commented
Summary
- Adds
TestShVarWithIncludesto ensuresh:dynamic variables resolve correctly when a Taskfile also hasincludes: - Guards against regressions like the one fixed in v3.49.1 (see Regression in v3.49.0: Global sh: variables resolve to empty string in included Taskfiles #2720, fix: avoid clobbering sh: vars when resolving global Ref values #2721)
- No code changes — test-only PR to improve coverage
Context
PR #2721 fixed a regression where global sh: variables resolved to empty strings when the Taskfile had includes:. That PR was superseded by the revert in #2723, but no test was added to prevent the issue from recurring. This PR adds that missing test coverage.
Test plan
-
TestShVarWithIncludespasses on currentmain(post-revert) - Golden file asserts
DYNAMIC_VAR=helloandDERIVED_VAR=hello world
🤖 Generated with Claude Code
Add TestShVarWithIncludes to ensure sh: dynamic variables are correctly resolved when a Taskfile also has includes. This guards against regressions like the one fixed in v3.49.1 (go-task#2720, go-task#2721). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
trulede
self-assigned this
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