mirror of
https://github.com/go-task/task.git
synced 2026-08-29 10:08:27 +02:00
feat: command timeouts (#2898)
This commit is contained in:
@@ -7,10 +7,11 @@ import (
|
||||
)
|
||||
|
||||
type Defer struct {
|
||||
Cmd string
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
Cmd string
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
Timeout string
|
||||
}
|
||||
|
||||
func (d *Defer) UnmarshalYAML(node *yaml.Node) error {
|
||||
@@ -26,10 +27,11 @@ func (d *Defer) UnmarshalYAML(node *yaml.Node) error {
|
||||
|
||||
case yaml.MappingNode:
|
||||
var deferStruct struct {
|
||||
Defer string
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
Defer string
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
Timeout string
|
||||
}
|
||||
if err := node.Decode(&deferStruct); err != nil {
|
||||
return errors.NewTaskfileDecodeError(err, node)
|
||||
@@ -38,6 +40,7 @@ func (d *Defer) UnmarshalYAML(node *yaml.Node) error {
|
||||
d.Task = deferStruct.Task
|
||||
d.Vars = deferStruct.Vars
|
||||
d.Silent = deferStruct.Silent
|
||||
d.Timeout = deferStruct.Timeout
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user