mirror of
https://github.com/go-task/task.git
synced 2025-04-18 12:04:04 +03:00
fix: bug where undefined/null variables resolve to "" instead of nil (#2144)
This commit is contained in:
parent
60e28ecdcc
commit
03b242d4c3
@ -75,7 +75,7 @@ func (c *Compiler) getVariables(t *ast.Task, call *Call, evaluateShVars bool) (*
|
||||
return err
|
||||
}
|
||||
// If the variable is already set, we can set it and return
|
||||
if newVar.Value != nil {
|
||||
if newVar.Value != nil || newVar.Sh == nil {
|
||||
result.Set(k, ast.Var{Value: newVar.Value})
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user