Skip to content

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

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

Open
bijela-gora opened this issue May 10, 2025 · 1 comment
Open

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

bijela-gora opened this issue May 10, 2025 · 1 comment
Assignees
Labels
area: watcher Changes related to the Taskfile watcher.

Comments

@bijela-gora
Copy link

bijela-gora commented May 10, 2025

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

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label May 10, 2025
@andreynering andreynering added area: watcher Changes related to the Taskfile watcher. and removed state: needs triage Waiting to be triaged by a maintainer. labels May 12, 2025
@andreynering andreynering self-assigned this May 12, 2025
@bijela-gora
Copy link
Author

@andreynering thank you for reviewing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: watcher Changes related to the Taskfile watcher.
Projects
None yet
Development

No branches or pull requests

3 participants