1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +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

@@ -7,9 +7,10 @@ import (
// Cmd is a task command
type Cmd struct {
Cmd string
Task string
Vars Vars
Cmd string
Silent bool
Task string
Vars Vars
}
// Dep is a task dependency
@@ -36,6 +37,15 @@ func (c *Cmd) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
return nil
}
var cmdStruct struct {
Cmd string
Silent bool
}
if err := unmarshal(&cmdStruct); err == nil && cmdStruct.Cmd != "" {
c.Cmd = cmdStruct.Cmd
c.Silent = cmdStruct.Silent
return nil
}
var taskCall struct {
Task string
Vars Vars