Update types.build.provisioners.go

if pause_before is invalid, that's an error
This commit is contained in:
Adrien Delorme 2021-04-26 17:37:24 +02:00
parent e60a7e60b9
commit bf939b7474
1 changed files with 3 additions and 2 deletions

View File

@ -119,8 +119,9 @@ func (p *Parser) decodeProvisioner(block *hcl.Block, cfg *PackerConfig) (*Provis
pauseBefore, err := time.ParseDuration(b.PauseBefore)
if err != nil {
return nil, append(diags, &hcl.Diagnostic{
Summary: "Failed to parse pause_before duration",
Detail: err.Error(),
Summary: "Failed to parse pause_before duration",
Severity: hcl.DiagError,
Detail: err.Error(),
})
}
provisioner.PauseBefore = pauseBefore