-
-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v3.39.0] defer no longer evaluates variables #1803
Comments
I believe this was the change that introduced the behavior change: #1762 I pulled down the commit before the change: Pulling down the change: |
I have the same problem. |
|
This seems like a major regression that should have been caught by a test case. All my |
Just updated to Task version: v3.39.1 (h1:yIaLD5TZWXU/SdmadBReQKu8jblRxzRT+lJG4xC3CMw=) but I still have the same issue |
@kevintijssen are you sure? I just updated and it works fine on # Taskfile.1803.yml
version: "3"
vars:
FILE_VAR: "file-issue-1803"
tasks:
repro:
vars:
TASK_VAR: "task-issue-1803"
cmds:
- defer: rmdir "{{.FILE_VAR}}"
- defer: rmdir "{{.TASK_VAR}}"
- mkdir -p "{{.FILE_VAR}}"
- mkdir -p "{{.TASK_VAR}}"
|
Task version: v3.39.1 (h1:yIaLD5TZWXU/SdmadBReQKu8jblRxzRT+lJG4xC3CMw=)
|
Looks like the bug is partially fixed 🙈 @andreynering @vmaerten the fix in #1814 doesn't seem to support dynamic vars # Taskfile.1803.yml
version: "3"
vars:
FILE_VAR: "file-issue-1803"
tasks:
repro:
vars:
TASK_VAR: "task-issue-1803"
SH_TASK_VAR:
sh: echo "sh-task-issue-1803"
cmds:
- defer: rmdir "{{.FILE_VAR}}"
- defer: rmdir "{{.TASK_VAR}}"
- defer: rmdir "{{.SH_TASK_VAR}}"
- mkdir -p "{{.FILE_VAR}}"
- mkdir -p "{{.TASK_VAR}}"
- mkdir -p "{{.SH_TASK_VAR}}"
|
You're totally right. |
woohoo! 🚀
Thanks @vmaerten for the quick turn around on this 💪 |
It's still broken on snapcraft.io stable channel. |
@cwegener I just released on Snapcraft. Sorry, it was just forgotten. |
Thanks! The stable snapcraft channel works again now.. |
defer
is no longer evaluating variables in task 3.39.0. In the sampleTaskfile.yml
below, I've created a simple reproduction.To reproduce:
Run
task my-repro
with the taskfile below.See the following output is
Expected behavior (+ the behavior on v3.38.0):
The text was updated successfully, but these errors were encountered: