From 6a569b964fa336592a32360ab8ecd360496d3f1f Mon Sep 17 00:00:00 2001 From: Rohit Kothari Date: Mon, 18 Oct 2021 06:03:44 -0700 Subject: [PATCH] Show successful message upon successful packer validate (#11337) * Show successful message upon successful packer validate Co-authored-by: Adrien Delorme --- command/validate.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/validate.go b/command/validate.go index 910682dba..8bef1ffc6 100644 --- a/command/validate.go +++ b/command/validate.go @@ -74,7 +74,12 @@ func (c *ValidateCommand) RunContext(ctx context.Context, cla *ValidateArgs) int }) diags = append(diags, fixerDiags...) - return writeDiags(c.Ui, nil, diags) + ret = writeDiags(c.Ui, nil, diags) + if ret == 0 { + c.Ui.Say("The configuration is valid.") + } + + return ret } func (*ValidateCommand) Help() string {