add --list (or -l) flag to print existing tasks

If an inexixtent task is given, the help also prints as before

Also fixing README documentation

Closes #51
This commit is contained in:
Andrey Nering
2017-07-15 14:09:27 -03:00
parent e781ac2512
commit 998935ea55
4 changed files with 16 additions and 7 deletions

View File

@@ -85,7 +85,7 @@ func (e *Executor) Run(args ...string) error {
for _, a := range args {
if _, ok := e.Tasks[a]; !ok {
// FIXME: move to the main package
e.printExistingTasksHelp()
e.PrintTasksHelp()
return &taskNotFoundError{taskName: a}
}
}