Skip to content

3.35.0 Regression: Source paths will always be returned as paths relative to the task directory #1529

@danilobuerger

Description

@danilobuerger

In https://taskfile.dev/usage/ it is specified that:

Source paths will always be returned as paths relative to the task directory

The following Taskfile worked in 3.33.1 but does not work in 3.35.0:

version: "3"

tasks:
  foo:
    cmds:
      - for: sources
        cmd: echo {{.ITEM}}
    sources:
      - "**/*.txt"
    method: none

With a file at 123/456/asd.txt the output for 3.33.1 was:

❯ task foo
task: [foo] echo 123/456/asd.txt
123/456/asd.txt
❯ cd 123 && task foo
task: [foo] echo 123/456/asd.txt
123/456/asd.txt

Now with 3.35.0 it is:

❯ task foo
task: [foo] echo 123/456/asd.txt
123/456/asd.txt
❯ cd 123 && task foo
task: [foo] echo 456/asd.txt
456/asd.txt
  • Task version: 3.35.0
  • Operating system: MacOS 14.3.1
  • Experiments enabled: No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions