diff --git a/bake/bake.go b/bake/bake.go index e5ee0ca9..a8c7c37f 100644 --- a/bake/bake.go +++ b/bake/bake.go @@ -526,6 +526,9 @@ func removeDupes(s []string) []string { if _, ok := seen[v]; ok { continue } + if v == "" { + continue + } seen[v] = struct{}{} s[i] = v i++ diff --git a/bake/hcl.go b/bake/hcl.go index 6f19390e..510d2e60 100644 --- a/bake/hcl.go +++ b/bake/hcl.go @@ -31,6 +31,7 @@ var ( "csvdecode": stdlib.CSVDecodeFunc, "coalesce": stdlib.CoalesceFunc, "coalescelist": stdlib.CoalesceListFunc, + "compact": stdlib.CompactFunc, "concat": stdlib.ConcatFunc, "contains": stdlib.ContainsFunc, "distinct": stdlib.DistinctFunc,