Skip to content

Add posibility to include by dotenv #582

@antonio-antuan

Description

@antonio-antuan

Hi!
I want to include taskfiles by dotenv var. For now I see that it is not possible because dotenv read when files already included...

.env:

TASKFILE_PATH=./child

Taskfile.yml:

version: '3'

dotenv:
  - .env

includes:
  child: 
    taskfile: $TASKFILE_PATH/Taskfile2.yml
    optional: true
    dir: $TASKFILE_PATH

Taskfile2.yml:

version: '3'

tasks:
  default:
    cmds:
      - echo child

Also, it is not possible for now to include with env variable:
Taskfile.yml:

version: '3'

env:
  TASKFILE_PATH: Taskfile2.yml

includes:
  child: 
    taskfile: $TASKFILE_PATH
    optional: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions