diff --git a/task.go b/task.go index 4d6f9453..49fa1049 100644 --- a/task.go +++ b/task.go @@ -84,6 +84,7 @@ func (e *Executor) displayTaskDetails(task string) { if e.Taskfile.Tasks[task].Details == "" { e.Logger.Errf("task: There is no detailed description for task: %s", task) } else { + e.Logger.Outf(e.Taskfile.Tasks[task].Details) } } diff --git a/task_test.go b/task_test.go index fed7f824..6c7c18f0 100644 --- a/task_test.go +++ b/task_test.go @@ -582,9 +582,7 @@ func TestDetails(t *testing.T) { buff.Reset() assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: "task-with-details"})) - assert.Contains(t, buff.String(), "details of task-with-details - line 1") - assert.Contains(t, buff.String(), "line 2") - assert.Contains(t, buff.String(), "line 3") + assert.Equal(t, buff.String(), "details of task-with-details - line 1\n"+"line 2\n"+"line 3\n\n") assert.NotContains(t, buff.String(), "task-with-details was executed") assert.NotContains(t, buff.String(), "dependend-task was executed")