-
-
Notifications
You must be signed in to change notification settings - Fork 762
Open
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.
Description
Description
Trying to run the example from the docs https://taskfile.dev/docs/guide#looping-over-your-task-s-sources-or-generated-files (the one with for: generates). If no file exist (which is the common case -- this task is supposed to create this files), no "cat" happens. If both files already exist, it works as expected. If only one of the files exist, only that file is cat'ed.
❯ rm foo.txt
❯ rm bar.txt
❯ task
❯ touch bar.txt
❯ task
task: [default] cat bar.txt
❯ touch foo.txt
❯ task
task: [default] cat bar.txt
task: [default] cat foo.txt
❯Version
3.45.5
Operating system
macOS
Experiments Enabled
No response
Example Taskfile
version: '3'
tasks:
default:
generates:
- foo.txt
- bar.txt
cmds:
- for: generates
cmd: cat {{ .ITEM }}Metadata
Metadata
Assignees
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.