Skip to content
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

Dynamic variables are logged incorrectly in verbose mode #1920

Closed
mgbowman opened this issue Nov 16, 2024 · 1 comment · Fixed by #1921
Closed

Dynamic variables are logged incorrectly in verbose mode #1920

mgbowman opened this issue Nov 16, 2024 · 1 comment · Fixed by #1921
Labels
area: variables Changes related to variables.

Comments

@mgbowman
Copy link
Contributor

Dynamic variables are logged incorrectly when running in --verbose mode. It looks like a regression introduced in #1904 when v.Sh was refactored to a pointer.

Taskfile.yml to reproduce (standard task --init where GREETING is a dynamic var)

# https://taskfile.dev

version: '3'

vars:
  GREETING: 
    sh: echo "Hello, World!"

tasks:
  default:
    cmds:
      - echo "{{.GREETING}}"
    silent: true

Actual Output

$ task --verbose
task: [/workspaces/personal/go-task/taskfiles/dynamic-vars] Not found - Using alternative (Taskfile.yml)
task: dynamic variable: %!q(*string=0xc000146cf0) result: "Hello, World!"
task: "default" started
task: [default] echo "Hello, World!"
Hello, World!
task: "default" finished

Expected Output

$ task --verbose
task: [/workspaces/personal/go-task/taskfiles/dynamic-vars] Not found - Using alternative (Taskfile.yml)
task: dynamic variable: "echo \"Hello, World!\"" result: "Hello, World!"
task: "default" started
task: [default] echo "Hello, World!"
Hello, World!
task: "default" finished
  • Task version: v3.40.0 (h1:1gKx+2UDz06Jtm0MBiN+EqVN87wWEyspuEze4LRGusk=)
  • Operating system: Linux colima 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 9 17:03:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
  • Experiments enabled:
* GENTLE_FORCE:     off
* REMOTE_TASKFILES: off
* MAP_VARIABLES:    off
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Nov 16, 2024
@JonZeolla
Copy link
Contributor

I'm seeing this bug too. @pd93 I think this is a side effect of your work in #1904

@vmaerten vmaerten added type: bug Something not working as intended. area: variables Changes related to variables. and removed state: needs triage Waiting to be triaged by a maintainer. labels Dec 7, 2024
@pd93 pd93 removed the type: bug Something not working as intended. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: variables Changes related to variables.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants