We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ed30f1 commit cbb12b2Copy full SHA for cbb12b2
internal/taskfile/taskfile.go
@@ -41,5 +41,11 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
41
if tf.Expansions <= 0 {
42
tf.Expansions = 2
43
}
44
+ if tf.Vars == nil {
45
+ tf.Vars = &Vars{}
46
+ }
47
+ if tf.Env == nil {
48
+ tf.Env = &Vars{}
49
50
return nil
51
internal/taskfile/var.go
@@ -50,9 +50,6 @@ func (vs *Vars) Merge(other *Vars) {
// Set sets a value to a given key
52
func (vs *Vars) Set(key string, value Var) {
53
- if vs == nil {
54
- vs = &Vars{}
55
- }
56
if vs.Mapping == nil {
57
vs.Mapping = make(map[string]Var, 1)
58
0 commit comments