mirror of
https://github.com/go-task/task.git
synced 2026-07-08 22:46:07 +00:00
fix: ensure that calls to other tasks can be silenced (#680)
This commit is contained in:
committed by
Andrey Nering
parent
f0e9751f7e
commit
9a406f5998
@@ -2,6 +2,7 @@ package taskfile
|
||||
|
||||
// Call is the parameters to a task call
|
||||
type Call struct {
|
||||
Task string
|
||||
Vars *Vars
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
|
||||
if err := node.Decode(&taskCall); err == nil && taskCall.Task != "" {
|
||||
c.Task = taskCall.Task
|
||||
c.Vars = taskCall.Vars
|
||||
c.Silent = cmdStruct.Silent
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,9 @@ import (
|
||||
|
||||
// Dep is a task dependency
|
||||
type Dep struct {
|
||||
Task string
|
||||
Vars *Vars
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
}
|
||||
|
||||
func (d *Dep) DeepCopy() *Dep {
|
||||
@@ -35,14 +36,16 @@ func (d *Dep) UnmarshalYAML(node *yaml.Node) error {
|
||||
|
||||
case yaml.MappingNode:
|
||||
var taskCall struct {
|
||||
Task string
|
||||
Vars *Vars
|
||||
Task string
|
||||
Vars *Vars
|
||||
Silent bool
|
||||
}
|
||||
if err := node.Decode(&taskCall); err != nil {
|
||||
return err
|
||||
}
|
||||
d.Task = taskCall.Task
|
||||
d.Vars = taskCall.Vars
|
||||
d.Silent = taskCall.Silent
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user