mirror of
https://github.com/go-task/task.git
synced 2025-03-05 15:05:42 +02:00
v3: Fix bug where global vars were not being considered
This commit is contained in:
parent
6ed30f1add
commit
cbb12b29bd
@ -41,5 +41,11 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
if tf.Expansions <= 0 {
|
||||
tf.Expansions = 2
|
||||
}
|
||||
if tf.Vars == nil {
|
||||
tf.Vars = &Vars{}
|
||||
}
|
||||
if tf.Env == nil {
|
||||
tf.Env = &Vars{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -50,9 +50,6 @@ func (vs *Vars) Merge(other *Vars) {
|
||||
|
||||
// Set sets a value to a given key
|
||||
func (vs *Vars) Set(key string, value Var) {
|
||||
if vs == nil {
|
||||
vs = &Vars{}
|
||||
}
|
||||
if vs.Mapping == nil {
|
||||
vs.Mapping = make(map[string]Var, 1)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user