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

Add hability silent all tasks

By add `silent: true` at the root of the Taskfile.
This commit is contained in:
Andrey Nering
2019-12-07 21:44:09 -03:00
parent ec934ba3c0
commit 4bdfe64afb
6 changed files with 23 additions and 3 deletions

View File

@ -9,6 +9,7 @@ type Taskfile struct {
Vars Vars
Env Vars
Tasks Tasks
Silent bool
}
// UnmarshalYAML implements yaml.Unmarshaler interface
@ -26,6 +27,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
Vars Vars
Env Vars
Tasks Tasks
Silent bool
}
if err := unmarshal(&taskfile); err != nil {
return err
@ -37,6 +39,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
tf.Vars = taskfile.Vars
tf.Env = taskfile.Env
tf.Tasks = taskfile.Tasks
tf.Silent = taskfile.Silent
if tf.Expansions <= 0 {
tf.Expansions = 2
}