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:
committed by
Andrey Nering
parent
a7b59e5b12
commit
97c85e39c3
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user