feat: command timeouts (#2898)

This commit is contained in:
Valentin Maerten
2026-08-11 22:09:25 +02:00
committed by GitHub
parent 993508c782
commit 37898d9102
21 changed files with 830 additions and 50 deletions

View File

@@ -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
}