Skip to content

Commit 623db0e

Browse files
committed
Only have colored output on v3
1 parent 0e575e9 commit 623db0e

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2'
1+
version: '3'
22

33
includes:
44
docs: ./docs

docs/Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2'
1+
version: '3'
22

33
tasks:
44
install:

task.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,13 @@ func (e *Executor) Setup() error {
124124
if v < 1 {
125125
return fmt.Errorf(`task: Taskfile version should be greater or equal to v1`)
126126
}
127-
if v > 2.6 {
128-
return fmt.Errorf(`task: Taskfile versions greater than v2.6 not implemented in the version of Task`)
127+
if v > 3.0 {
128+
return fmt.Errorf(`task: Taskfile versions greater than v3.0 not implemented in the version of Task`)
129+
}
130+
131+
// Color available only on v3
132+
if v < 3 {
133+
e.Logger.Color = false
129134
}
130135

131136
if v < 2 {

0 commit comments

Comments
 (0)