mirror of
https://github.com/go-task/task.git
synced 2025-06-27 00:51:05 +02:00
feat: set and shopt directives (#929)
Co-authored-by: Andrey Nering <andrey@nering.com.br>
This commit is contained in:
@ -23,6 +23,8 @@ type Task struct {
|
||||
Status []string
|
||||
Preconditions []*Precondition
|
||||
Dir string
|
||||
Set []string
|
||||
Shopt []string
|
||||
Vars *Vars
|
||||
Env *Vars
|
||||
Dotenv []string
|
||||
@ -81,6 +83,8 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
|
||||
Status []string
|
||||
Preconditions []*Precondition
|
||||
Dir string
|
||||
Set []string
|
||||
Shopt []string
|
||||
Vars *Vars
|
||||
Env *Vars
|
||||
Dotenv []string
|
||||
@ -107,6 +111,8 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error {
|
||||
t.Status = task.Status
|
||||
t.Preconditions = task.Preconditions
|
||||
t.Dir = task.Dir
|
||||
t.Set = task.Set
|
||||
t.Shopt = task.Shopt
|
||||
t.Vars = task.Vars
|
||||
t.Env = task.Env
|
||||
t.Dotenv = task.Dotenv
|
||||
@ -140,6 +146,8 @@ func (t *Task) DeepCopy() *Task {
|
||||
Status: deepCopySlice(t.Status),
|
||||
Preconditions: deepCopySlice(t.Preconditions),
|
||||
Dir: t.Dir,
|
||||
Set: deepCopySlice(t.Set),
|
||||
Shopt: deepCopySlice(t.Shopt),
|
||||
Vars: t.Vars.DeepCopy(),
|
||||
Env: t.Env.DeepCopy(),
|
||||
Dotenv: deepCopySlice(t.Dotenv),
|
||||
|
Reference in New Issue
Block a user