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:
16
command.go
16
command.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user