Skip to content

Commit 955359b

Browse files
committed
Fix nil panic bug when assigning global var and no var is declared on the Taskfile
Closes #229 Ref #234
1 parent 4c295b5 commit 955359b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/taskfile/taskfile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,8 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
4040
if tf.Expansions <= 0 {
4141
tf.Expansions = 2
4242
}
43+
if tf.Vars == nil {
44+
tf.Vars = make(Vars)
45+
}
4346
return nil
4447
}

0 commit comments

Comments
 (0)