diff --git a/help.go b/help.go index b7f0dfc3..baea689e 100644 --- a/help.go +++ b/help.go @@ -122,6 +122,10 @@ func (e *Executor) ListTasks(o ListOptions) (bool, error) { // Only tasks with a non-empty description are printed if allTasks is false. // Otherwise, all task names are printed. func (e *Executor) ListTaskNames(allTasks bool) { + // if called from cmd/task.go, e.Logger has not yet been initialized + if e.Logger == nil { + e.setupLogger() + } // if called from cmd/task.go, e.Taskfile has not yet been parsed if e.Taskfile == nil { if err := e.readTaskfile(); err != nil {