1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00

feat: add aliases to --json output

This commit is contained in:
Pete Davison
2023-12-18 09:45:41 +00:00
committed by Andrey Nering
parent edb9dcd284
commit c5a2e92e5e
2 changed files with 6 additions and 0 deletions

View File

@ -168,11 +168,16 @@ func (e *Executor) ToEditorOutput(tasks []*taskfile.Task, noStatus bool) (*edito
for i := range tasks {
task := tasks[i]
j := i
aliases := []string{}
if len(task.Aliases) > 0 {
aliases = task.Aliases
}
g.Go(func() error {
o.Tasks[j] = editors.Task{
Name: task.Name(),
Desc: task.Desc,
Summary: task.Summary,
Aliases: aliases,
UpToDate: false,
Location: &editors.Location{
Line: task.Location.Line,