Skip to content

Doesn't watch a task with run: once #2255

Open
@bijela-gora

Description

@bijela-gora

Description

When watching a task with run: once the cmds doesn't executed.

Exampler:

  experimental:
    run: once
    watch: true
    cmds:
      - echo Hello
    sources:
      - 1.txt

Run task experimental.

  • What did you expect to happen?
task: Started watching for tasks: experimental-2
task: [experimental-2] echo Hello
Hello
task: task "experimental-2" finished running
task: [experimental-2] echo Hello
Hello
task: task "experimental-2" finished running
task: [experimental-2] echo Hello
Hello
task: task "experimental-2" finished running
task: [experimental-2] echo Hello
Hello
task: task "experimental-2" finished running
task: [experimental-2] echo Hello
Hello
  • What happened instead?
task: Started watching for tasks: experimental-2
task: [experimental-2] echo Hello
Hello
task: task "experimental-2" finished running
task: task "experimental-2" finished running
task: task "experimental-2" finished running
task: task "experimental-2" finished running

To trigger watch mechanism it is needed to edit the file 1.txt.

Version

3.43.3

Operating system

Fedora Linux 42

Experiments Enabled

No response

Example Taskfile

Metadata

Metadata

Assignees

Labels

area: watcherChanges related to the Taskfile watcher.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions