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

Propagation of variables fails since the v3.33.0 release. #1435

Closed
ZCube opened this issue Dec 21, 2023 · 1 comment · Fixed by #1437
Closed

Propagation of variables fails since the v3.33.0 release. #1435

ZCube opened this issue Dec 21, 2023 · 1 comment · Fixed by #1437
Labels
area: variables Changes related to variables.

Comments

@ZCube
Copy link

ZCube commented Dec 21, 2023

  • Task version: v3.33.0
  • Operating system: Linux
  • Experiments enabled:
  • Example
# yaml-language-server: $schema=https://taskfile.dev/schema.json

version: "3"

vars:
  GIT_URL:
    sh: git ls-remote --get-url
  GIT_GROUP: '{{first (slice (splitList "/" .GIT_URL) 3 4)}}'
  GIT_PROJECT: '{{first (slice (splitList ".git" (first (slice (splitList "/" .GIT_URL) 4 5))) 0)}}'

tasks:
  test:
    desc: update tasks
    cmds:
      - echo {{.GIT_URL}}
      - echo {{.GIT_GROUP}}
      - echo {{.GIT_PROJECT}}
  • v3.33.0 (Fail)
root@a577eb48cc8f:/work# TASK_X_ANY_VARIABLES=1 task test
template: :1:30: executing "" at <.GIT_URL>: wrong type for value; expected string; got map[string]interface {}
root@a577eb48cc8f:/work# TASK_X_ANY_VARIABLES=0 task test
template: :1:9: executing "" at <slice (splitList "/" .GIT_URL) 3 4>: error calling slice: reflect.Value.Slice: slice index out of bounds
  • v3.32.0 (Success)
root@a577eb48cc8f:/work# TASK_X_ANY_VARIABLES=1 task test
task: [test] echo ssh://[email protected]:2222/d2e/backend
ssh://git@******/some/backend
task: [test] echo some
some
task: [test] echo backend
backend
root@a577eb48cc8f:/work# TASK_X_ANY_VARIABLES=0 task test
task: [test] echo ssh://[email protected]:2222/d2e/backend
ssh://git@******/some/backend
task: [test] echo some
some
task: [test] echo backend
backend
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Dec 21, 2023
@ZCube ZCube changed the title Propagation of variables fails since the v3.34.0 release. Propagation of variables fails since the v3.33.0 release. Dec 21, 2023
@pd93
Copy link
Member

pd93 commented Dec 21, 2023

@ZCube thanks for the report. I've opened #1437 to address this.

@pd93 pd93 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 21, 2023
@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.

3 participants