mirror of
https://github.com/go-task/task.git
synced 2025-06-27 00:51:05 +02:00
Add support for 'platforms' in both task and command (#980)
This commit is contained in:
@ -14,6 +14,7 @@ type Cmd struct {
|
||||
Vars *Vars
|
||||
IgnoreError bool
|
||||
Defer bool
|
||||
Platforms []*Platform
|
||||
}
|
||||
|
||||
// Dep is a task dependency
|
||||
@ -40,11 +41,13 @@ func (c *Cmd) UnmarshalYAML(node *yaml.Node) error {
|
||||
Cmd string
|
||||
Silent bool
|
||||
IgnoreError bool `yaml:"ignore_error"`
|
||||
Platforms []*Platform
|
||||
}
|
||||
if err := node.Decode(&cmdStruct); err == nil && cmdStruct.Cmd != "" {
|
||||
c.Cmd = cmdStruct.Cmd
|
||||
c.Silent = cmdStruct.Silent
|
||||
c.IgnoreError = cmdStruct.IgnoreError
|
||||
c.Platforms = cmdStruct.Platforms
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user