mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
feat (help): allow cli option to list tasks with no desc
added an add'l cli option that lists all tasks, with or without description.
orig. behavior: task -l lists tasks with desc field
new behaviour: task -la or task -a will list all tasks. if task has desc, it will be included.
BREAKING CHANGES: none, that I know of.
NOTES/Concerns:
- This is wip.
- Haven't checked how it interacts with bash completion.
- The new Executor.TaskNames func does not use e.CompiledTask(taskfile.Call{Task: task.Task})
This commit is contained in:
4
task.go
4
task.go
@@ -64,7 +64,9 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
|
||||
for _, c := range calls {
|
||||
if _, ok := e.Taskfile.Tasks[c.Task]; !ok {
|
||||
// FIXME: move to the main package
|
||||
e.PrintTasksHelp()
|
||||
// FIXME: (ard.kevin.84@gmail.com) changed the PrintTasksHelp signature to support show all/some.
|
||||
// False preserves original behavior, but should be reviewed.
|
||||
e.PrintTasksHelp(false)
|
||||
return &taskNotFoundError{taskName: c.Task}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user