From acdb601e8dc0372081920d1a7725516f77d06c6d Mon Sep 17 00:00:00 2001 From: Kit Patella Date: Wed, 25 Sep 2024 16:38:55 -0700 Subject: [PATCH] fix: propagate any errors in src/pkg/variables Signed-off-by: Kit Patella --- src/pkg/variables/templates.go | 7 ++++++- src/pkg/variables/templates_test.go | 11 +++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/pkg/variables/templates.go b/src/pkg/variables/templates.go index f0153d0baa..a4dcf1d84f 100644 --- a/src/pkg/variables/templates.go +++ b/src/pkg/variables/templates.go @@ -57,7 +57,6 @@ func (vc *VariableConfig) ReplaceTextTemplate(path string) error { if err != nil { return err } - defer textFile.Close() // This regex takes a line and parses the text before and after a discovered template: https://regex101.com/r/ilUxAz/1 regexTemplateLine := regexp.MustCompile(fmt.Sprintf("(?P.*?)(?P