From 23531a2deb78ae945288399206730a8466bbd51b Mon Sep 17 00:00:00 2001 From: Alberto Rojas Date: Fri, 9 Dec 2022 06:25:09 -0700 Subject: [PATCH] Fix FmtTemplate Execute data map values --- terraform/parser.go | 2 +- terraform/template.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/terraform/parser.go b/terraform/parser.go index 9dace47..938afc4 100644 --- a/terraform/parser.go +++ b/terraform/parser.go @@ -90,7 +90,7 @@ func (p *DefaultParser) Parse(body string) ParseResult { func (p *FmtParser) Parse(body string) ParseResult { result := ParseResult{} if p.Fail.MatchString(body) { - result.Result = body + result.Result = "There is diff in your .tf file (need to be formatted)" result.ExitCode = ExitFail } return result diff --git a/terraform/template.go b/terraform/template.go index 5387471..848e6dd 100644 --- a/terraform/template.go +++ b/terraform/template.go @@ -241,8 +241,8 @@ func (t *FmtTemplate) Execute() (string, error) { data := map[string]interface{}{ "Title": t.Title, "Message": t.Message, - "Result": "", - "Body": t.Result, + "Result": t.Result, + "Body": t.Body, "Link": t.Link, }