1
0
mirror of https://github.com/go-task/task.git synced 2025-04-15 11:56:34 +02:00

Fix nil panic bug when assigning global var and no var is declared on the Taskfile

Closes #229
Ref #234
This commit is contained in:
Andrey Nering 2019-08-10 19:38:57 -03:00
parent 4c295b564a
commit 955359b073

View File

@ -40,5 +40,8 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error {
if tf.Expansions <= 0 {
tf.Expansions = 2
}
if tf.Vars == nil {
tf.Vars = make(Vars)
}
return nil
}