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

Bug: In watch mode, when sources are present in another task, defer statements run after re-running the task #1413

Open
20manas opened this issue Nov 29, 2023 · 0 comments
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@20manas
Copy link

20manas commented Nov 29, 2023

Expected Behavior: Regardless of where the sources are, if files are being watched and a file among them changes, defer statements should always run before running the task again.

Taskfile:

version: '3'

tasks:
  server:
    watch: true
    sources: 
      - '**/*.go'
    generates:
      - './tmp/main'
    cmds:
      - go build -o ./tmp/main ./cmd/something/
      - ./tmp/main

  
  abc:
    watch: true
    cmds:
      - echo "started"
      - defer: echo "ended"
      - task: server

Output:

image

  • Task version: v3.31.0
  • Operating system: Linux
  • Experiments enabled: no
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants