From 623db0ed94404840564ff4988f3d3a5892e608f8 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sun, 7 Jul 2019 14:18:02 -0300 Subject: [PATCH] Only have colored output on v3 --- Taskfile.yml | 2 +- docs/Taskfile.yml | 2 +- task.go | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index c85fd0ff..52393d09 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' includes: docs: ./docs diff --git a/docs/Taskfile.yml b/docs/Taskfile.yml index e3fe3ef8..d7360131 100644 --- a/docs/Taskfile.yml +++ b/docs/Taskfile.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' tasks: install: diff --git a/task.go b/task.go index c5a33009..72e3e0b5 100644 --- a/task.go +++ b/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 {