1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

add silent mode to disable echoing of commands

This commit is contained in:
Andrey Nering
2017-07-19 20:20:24 -03:00
parent dc6cb68327
commit d0b37df615
5 changed files with 82 additions and 8 deletions

View File

@@ -185,15 +185,17 @@ func (t *Task) ReplaceVariables(vars Vars) (*Task, error) {
Vars: r.replaceVars(t.Vars),
Set: r.replace(t.Set),
Env: r.replaceVars(t.Env),
Silent: t.Silent,
}
if len(t.Cmds) > 0 {
new.Cmds = make([]*Cmd, len(t.Cmds))
for i, cmd := range t.Cmds {
new.Cmds[i] = &Cmd{
Task: r.replace(cmd.Task),
Cmd: r.replace(cmd.Cmd),
Vars: r.replaceVars(cmd.Vars),
Task: r.replace(cmd.Task),
Silent: cmd.Silent,
Cmd: r.replace(cmd.Cmd),
Vars: r.replaceVars(cmd.Vars),
}
}