1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

Only run task once for #53

This commit is contained in:
Ross Hammermeister
2020-08-17 13:25:17 -06:00
committed by Andrey Nering
parent a7b59e5b12
commit 97c85e39c3
12 changed files with 173 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ type Taskfile struct {
Tasks Tasks
Silent bool
Dotenv []string
Run string
}
// UnmarshalYAML implements yaml.Unmarshaler interface
@@ -32,6 +33,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
Tasks Tasks
Silent bool
Dotenv []string
Run string
}
if err := unmarshal(&taskfile); err != nil {
return err
@@ -46,6 +48,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
tf.Tasks = taskfile.Tasks
tf.Silent = taskfile.Silent
tf.Dotenv = taskfile.Dotenv
tf.Run = taskfile.Run
if tf.Expansions <= 0 {
tf.Expansions = 2
}