From 5b51b0c09c41c800897fb929344712c0877580e2 Mon Sep 17 00:00:00 2001 From: SAY-5 Date: Wed, 15 Apr 2026 09:17:39 -0700 Subject: [PATCH] fix(hcl2template): correct 'occured' -> 'occurred' in evaluation diagnostic Detail strings types.packer_config.go raised two HCL diagnostics with 'An error occured while recursively evaluating ...' instead of 'An error occurred ...'. Both messages are surfaced in packer's diagnostic output to end users when local/data evaluation fails. go build on the hcl2template package stays clean. --- hcl2template/types.packer_config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcl2template/types.packer_config.go b/hcl2template/types.packer_config.go index 6a97065fef8..e16f7f072f0 100644 --- a/hcl2template/types.packer_config.go +++ b/hcl2template/types.packer_config.go @@ -319,7 +319,7 @@ func (c *PackerConfig) recursivelyEvaluateLocalVariable(local *LocalBlock, depth return hcl.Diagnostics{&hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Max local recursion depth exceeded.", - Detail: "An error occured while recursively evaluating locals." + + Detail: "An error occurred while recursively evaluating locals." + "Your local variables likely have a cyclic dependency. " + "Please simplify your config to continue. ", }} @@ -428,7 +428,7 @@ func (cfg *PackerConfig) recursivelyEvaluateDatasources(ref DatasourceRef, depen diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagError, Summary: "Max datasource recursion depth exceeded.", - Detail: "An error occured while recursively evaluating data " + + Detail: "An error occurred while recursively evaluating data " + "sources. Either your data source depends on more than ten " + "other data sources, or your data sources have a cyclic " + "dependency. Please simplify your config to continue. ",