Use colors for some output messages

This commit is contained in:
Andrey Nering
2019-05-26 18:36:39 -03:00
parent 6ff9ba9df9
commit 8efc38ad82
11 changed files with 75 additions and 42 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/go-task/task/v2"
"github.com/go-task/task/v2/internal/args"
"github.com/go-task/task/v2/internal/logger"
"github.com/spf13/pflag"
)
@@ -117,7 +118,7 @@ func main() {
arguments := pflag.Args()
if len(arguments) == 0 {
log.Println("task: No argument given, trying default task")
e.Logger.Errf(logger.Yellow, "task: No argument given, trying default task")
arguments = []string{"default"}
}
@@ -139,7 +140,8 @@ func main() {
}
if err := e.Run(ctx, calls...); err != nil {
log.Fatal(err)
e.Logger.Errf(logger.Red, "%v", err)
os.Exit(1)
}
}