go-task / vscode-task

Task for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=task.vscode-task
MIT License
36 stars 4 forks source link

Using "outputTo" with "terminal" in combination with "includes" in Taskfile results in child Tasks not being able to run #124

Closed yoiang closed 5 months ago

yoiang commented 6 months ago

Hello! We ran into this issue where if we switched outputTo to terminal our included child Taskfile's commands were still being run with the parent's assigned prefix with in the child Taskfile's folder, ie:

Taskfile.yaml

...
includes:
  childtasks: 
    taskfile: ./childtasks_folder/Taskfile.yaml
    dir: ./childtasks_folder/
...

./childtasks_folder/Taskfile.yaml

...
tasks:
  dotask:
    cmds:
      - go_nuts
...

Running with outputTo=terminal would run from ./childtasks/ correctly but include the prefix childtasks as given by the parent Taskfile.yaml resolving to childtasks:dotask rather than just dotask.

This problem does not exist with the default outputTo settings!

yoiang commented 6 months ago

After further futzing around this looks like it is really a symptom of current status #125 means to resolve, it will pass the full task resolution name to the latest terminal regardless of what relative folder the terminal has open and assuming the terminal is in the root folder.