package task

import (
	"fmt"
	"sort"
	"text/tabwriter"
)

// PrintTasksHelp prints help os tasks that have a description
func (e *Executor) PrintTasksHelp() {
	tasks := e.tasksWithDesc()
	if len(tasks) == 0 {
		e.outf("task: No tasks with description available")
		return
	}
	e.outf("task: Available tasks for this project:")

	// Format in tab-separated columns with a tab stop of 8.
	w := tabwriter.NewWriter(e.Stdout, 0, 8, 0, '\t', 0)
	for _, task := range tasks {
		fmt.Fprintln(w, fmt.Sprintf("* %s: \t%s", task, e.Tasks[task].Desc))
	}
	w.Flush()
}

func (e *Executor) tasksWithDesc() (tasks []string) {
	for name, task := range e.Tasks {
		if task.Desc != "" {
			tasks = append(tasks, name)
		}
	}
	sort.Strings(tasks)
	return
}

package task

import (
	"fmt"
	"sort"
	"text/tabwriter"
)

// PrintTasksHelp prints help os tasks that have a description
func (e *Executor) PrintTasksHelp() {
	tasks := e.tasksWithDesc()
	if len(tasks) == 0 {
		return
	}
	e.outf("Available tasks for this project:")

	// Format in tab-separated columns with a tab stop of 8.
	w := tabwriter.NewWriter(e.Stdout, 0, 8, 0, '\t', 0)
	for _, task := range tasks {
		fmt.Fprintln(w, fmt.Sprintf("* %s: \t%s", task, e.Tasks[task].Desc))
	}
	w.Flush()
}

func (e *Executor) tasksWithDesc() (tasks []string) {
	for name, task := range e.Tasks {
		if task.Desc != "" {
			tasks = append(tasks, name)
		}
	}
	sort.Strings(tasks)
	return
}

--- 
+++ 
@@ -10,9 +10,10 @@
 func (e *Executor) PrintTasksHelp() {
 	tasks := e.tasksWithDesc()
 	if len(tasks) == 0 {
+		e.outf("task: No tasks with description available")
 		return
 	}
-	e.outf("Available tasks for this project:")
+	e.outf("task: Available tasks for this project:")
 
 	// Format in tab-separated columns with a tab stop of 8.
 	w := tabwriter.NewWriter(e.Stdout, 0, 8, 0, '\t', 0)
Revert "Revert "list: print message with there's no task with description""

This reverts commit e065dcb81659e5b3c38255ece1702d6c408ffebe.

Reintroducing this. Reverted unintentionally.
