Skip to content

Task "generates" not working as expected #1741

@ameergituser

Description

@ameergituser
  • Task version: Task version: v3.38.0 (h1:O7kgA6BfwktXHPrheByQO46p3teKtRuq1EpGnFxNzbo=)
  • Operating system: Linux
  • Experiments enabled: None

No fingerprinting for files listed in "generates" and hence it does not affect when the task executes the "cmds".

Example:

# https://taskfile.dev

version: '3'
silent: true

vars:
  GREETING: Hello, World!

tasks:
  default:
    cmds:
      - echo "{{.GREETING}}" > ./test.txt
    generates:
      - ./test.txt

Steps to reproduce:

  1. run task for the first time. It generates the test.txt file
  2. run task again. It always executes the cmds

Am i misunderstanding the generates feature? I assumed that files in the generates would be fingerprinted and when these files are changed, then the cmds would then execute?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions