1
0
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:
Pete Davison
2023-01-14 13:41:56 -06:00
committed by GitHub
parent 4be1050234
commit 1c1be683ab
15 changed files with 308 additions and 19 deletions

View File

@ -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),