From d8c33bc59ef4dfc369d4ce36aa423617ee894700 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Mon, 6 Jan 2020 14:31:15 +0100 Subject: [PATCH] HCL: deshadown warnings from Parser.Parse the func would return when `diags.HasErrors()` but this does not mean that diags is empty. --- hcl2template/types.packer_config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index dc8f29536..f3f061aa2 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -103,5 +103,6 @@ func (p *Parser) Parse(path string) ([]packer.Build, hcl.Diagnostics) { return nil, diags } - return p.getBuilds(cfg) + builds, moreDiags := p.getBuilds(cfg) + return builds, append(diags, moreDiags...) }