1
0
mirror of https://github.com/go-task/task.git synced 2025-03-17 21:08:01 +02:00

Only have colored output on v3

This commit is contained in:
Andrey Nering 2019-07-07 14:18:02 -03:00
parent 0e575e9c25
commit 623db0ed94
3 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
version: '2'
version: '3'
includes:
docs: ./docs

View File

@ -1,4 +1,4 @@
version: '2'
version: '3'
tasks:
install:

View File

@ -124,8 +124,13 @@ func (e *Executor) Setup() error {
if v < 1 {
return fmt.Errorf(`task: Taskfile version should be greater or equal to v1`)
}
if v > 2.6 {
return fmt.Errorf(`task: Taskfile versions greater than v2.6 not implemented in the version of Task`)
if v > 3.0 {
return fmt.Errorf(`task: Taskfile versions greater than v3.0 not implemented in the version of Task`)
}
// Color available only on v3
if v < 3 {
e.Logger.Color = false
}
if v < 2 {