File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2002,8 +2002,8 @@ cmd ran
20022002task: [task-2] exit 1
20032003task: [task-2] echo 'failing' && exit 2
20042004failing
2005- task: [task-2] echo 'echo ran'
20062005echo ran
2006+ task-1 ran successfully
20072007task: [task-1] echo 'task-1 ran successfully'
20082008task-1 ran successfully
20092009` )
Original file line number Diff line number Diff line change @@ -75,11 +75,13 @@ func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
7575
7676 // A deferred command
7777 var deferredCmd struct {
78- Defer string
78+ Defer string
79+ Silent bool
7980 }
8081 if err := node .Decode (& deferredCmd ); err == nil && deferredCmd .Defer != "" {
8182 c .Defer = true
8283 c .Cmd = deferredCmd .Defer
84+ c .Silent = deferredCmd .Silent
8385 return nil
8486 }
8587
@@ -91,6 +93,7 @@ func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
9193 c .Defer = true
9294 c .Task = deferredCall .Defer .Task
9395 c .Vars = deferredCall .Defer .Vars
96+ c .Silent = deferredCall .Defer .Silent
9497 return nil
9598 }
9699
Original file line number Diff line number Diff line change 1- version : " 3 "
1+ version : ' 3 '
22
33tasks :
44 task-1 :
55 - echo 'task-1 ran {{.PARAM}}'
66
77 task-2 :
8- - defer : { task: "task-1", vars: { PARAM: "successfully" } }
8+ - defer : { task: 'task-1', vars: { PARAM: 'successfully' } }
9+ - defer : { task: 'task-1', vars: { PARAM: 'successfully' }, silent: true }
910 - defer : echo 'echo ran'
11+ silent : true
1012 - defer : echo 'failing' && exit 2
1113 - echo 'cmd ran'
1214 - exit 1
You can’t perform that action at this time.
0 commit comments