1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

output detailed task description

This commit is contained in:
jaedle
2019-02-24 09:24:57 +01:00
parent 13614fb3c4
commit 07221a1b20
3 changed files with 18 additions and 1 deletions

12
task.go
View File

@@ -63,6 +63,18 @@ func (e *Executor) Run(ctx context.Context, calls ...taskfile.Call) error {
}
}
if e.Details {
task := calls[0].Task
if e.Taskfile.Tasks[task].Details == "" {
e.Logger.Errf("task: There is no detailed description for task: %s", task)
return nil
}
e.Logger.Outf(e.Taskfile.Tasks[task].Details)
return nil
}
if e.Watch {
return e.watchTasks(calls...)
}