1
0
mirror of https://github.com/go-task/task.git synced 2025-06-27 00:51:05 +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

@ -22,6 +22,7 @@ type Task struct {
Method string
Prefix string
IgnoreError bool
Run string
}
func (t *Task) Name() string {
@ -61,6 +62,7 @@ func (t *Task) UnmarshalYAML(unmarshal func(interface{}) error) error {
Method string
Prefix string
IgnoreError bool `yaml:"ignore_error"`
Run string
}
if err := unmarshal(&task); err != nil {
return err
@ -81,5 +83,6 @@ func (t *Task) UnmarshalYAML(unmarshal func(interface{}) error) error {
t.Method = task.Method
t.Prefix = task.Prefix
t.IgnoreError = task.IgnoreError
t.Run = task.Run
return nil
}