task
task copied to clipboard
Do not show label instead of task name in some places like `--list`
trafficstars
- Task version: 3.9.0
- Operating System: Ubuntu
Example Taskfile showing the issue
---
version: '3'
vars:
REPOSITORY_SUBTYPE: config
REPOSITORY_TYPE: npm
tasks:
one:
cmds:
- task: two
- pip3 install ansible
two:
interactive: true
label: three
desc: Hey
cmds:
- poetry env info --path
- poetry --help
- source "$(poetry env info --path)/bin/activate"
When assigning a label to a task, the task --list is updated with the task with the new label. However, when you attempt to run the task by running task [label_name], task fails to recognize the task.
Also, normally task alphabetizes the list shown in task --list. However, labeled items are not sorted alphabetically.
I propose that we:
- Allow the user to run tasks by specifying their label name (e.g.
task label_name) - Alphabetize the
task --listwith the label names included
Hmm... this actually sounds like more a bug to me where the label should not be shown in same places instead of the real task name, like on --list.
We can't allow tasks to be accessible by its label because the label can contains variables. That would certainly cause problems.