Skip to content

Shell is evaluated even before running the task #332

Description

@ronlut
  • Task version: v3.0.0-preview3
  • OS: mac

Hi, thanks for the great work!
Task v3 evaluates shell commands before running the task - for example when running task --list.
This is not the behaviour in v2 and doesn't make sense as a lot of tasks depend on previous tasks.

Example:

version: '3'

tasks:
  foo:
    desc: foo
    cmds:
      - echo $MSG
    env:
      MSG: {sh: 'sleep 10; echo hi'}

Running task --list will sleep for 10 seconds.
In v2 it will just work as expected :)

Same bug occurs under vars: so I guess it has to do with the shell evaluation.
If you point me into a direction that might cause this behaviour I can add a PR to fix it.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions