mirror of
https://github.com/go-task/task.git
synced 2025-11-25 22:32:55 +02:00
Add execute output style options
This commit is contained in:
4
task.go
4
task.go
@@ -46,6 +46,7 @@ type Executor struct {
|
||||
Logger *logger.Logger
|
||||
Compiler compiler.Compiler
|
||||
Output output.Output
|
||||
OutputStyle string
|
||||
|
||||
taskvars taskfile.Vars
|
||||
|
||||
@@ -134,6 +135,9 @@ func (e *Executor) Setup() error {
|
||||
if !version.IsV22(v) && len(e.Taskfile.Includes) > 0 {
|
||||
return fmt.Errorf(`task: Including Taskfiles is only available starting on Taskfile version v2.2`)
|
||||
}
|
||||
if e.OutputStyle != "" {
|
||||
e.Taskfile.Output = e.OutputStyle
|
||||
}
|
||||
switch e.Taskfile.Output {
|
||||
case "", "interleaved":
|
||||
e.Output = output.Interleaved{}
|
||||
|
||||
Reference in New Issue
Block a user