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:
parent
0e575e9c25
commit
623db0ed94
@ -1,4 +1,4 @@
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
includes:
|
||||
docs: ./docs
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
install:
|
||||
|
9
task.go
9
task.go
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user