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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user