mirror of
https://github.com/go-task/task.git
synced 2025-11-23 22:24:45 +02:00
fix: bug where undefined/null variables resolve to "" instead of nil (#2144)
This commit is contained in:
@@ -75,7 +75,7 @@ func (c *Compiler) getVariables(t *ast.Task, call *Call, evaluateShVars bool) (*
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
// If the variable is already set, we can set it and return
|
// 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})
|
result.Set(k, ast.Var{Value: newVar.Value})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user