bake: support null arg value

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2022-12-03 17:34:15 +01:00
parent e21f56e801
commit df4957307f
7 changed files with 264 additions and 132 deletions

View File

@ -83,7 +83,7 @@ func appendJSONFuncCalls(exp hcl.Expression, m map[string]struct{}) error {
// hcl/v2/json/ast#stringVal
val := src.FieldByName("Value")
if val.IsZero() {
if !val.IsValid() || val.IsZero() {
return nil
}
rng := src.FieldByName("SrcRange")