Skip to content

Internal task should inherit prefix from caller task #1906

@TLG-Gildas

Description

@TLG-Gildas

In case of output: prefixed, if we have a task calling an internal task (see ex taskfile above), prefix used for internal task should be caller task's prefix to completely hide internal task.

taskfile.yml :

version: 3

output: prefixed

tasks:
  .internal:
    internal: true
    cmds:
      - echo "internal"

  external2:
    cmds:
      - echo "external2"
      - task: .internal

  external:
    cmds:
      - echo "external"
      - task: external2

actual output of : task external

[external] external
[external2] external2
[internal] internal

expected output :

[external] external
[external2] external2
[external2] internal

I have put two levels of calling in this exemple to explicitly see that prefix should be inherited from direct caller only.

If prefix is customized on caller, then internal callee should use this one.
If prefix is customized on internal task, then there shouldn't have inheritance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions