From 963c368c31445667f539a86b7ff51765bcbbd0a0 Mon Sep 17 00:00:00 2001 From: Louis Sautier Date: Wed, 27 Aug 2025 19:26:27 +0200 Subject: [PATCH] hcl2template: fix spacing in error message Before this fix, the error message looked like: ``` A source type is made of three parts that aresplit by a dot `.`; each part must start with a letter and may contain only letters, digits, underscores, and dashes.A valid source reference looks like: `source.type.name` ``` --- hcl2template/types.build.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcl2template/types.build.go b/hcl2template/types.build.go index 648305ee2..6a3300eec 100644 --- a/hcl2template/types.build.go +++ b/hcl2template/types.build.go @@ -135,9 +135,9 @@ func (p *Parser) decodeBuildConfig(block *hcl.Block, cfg *PackerConfig) (*BuildB diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Invalid " + sourceLabel + " reference", - Detail: "A " + sourceLabel + " type is made of three parts that are" + + Detail: "A " + sourceLabel + " type is made of three parts that are " + "split by a dot `.`; each part must start with a letter and " + - "may contain only letters, digits, underscores, and dashes." + + "may contain only letters, digits, underscores, and dashes. " + "A valid source reference looks like: `source.type.name`", Subject: block.DefRange.Ptr(), })