From 48d0722c19b0341af0668aa15d4eb9a997a92401 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 22 Sep 2022 10:18:01 -0400 Subject: [PATCH] cli: print success message on var put (#14620) --- command/var_put.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/var_put.go b/command/var_put.go index ccb0e7c69..fb19417d7 100644 --- a/command/var_put.go +++ b/command/var_put.go @@ -315,7 +315,8 @@ func (c *VarPutCommand) Run(args []string) int { return 1 } - verbose(fmt.Sprintf("Created variable %q with modify index %v", sv.Path, sv.ModifyIndex)) + successMsg := fmt.Sprintf( + "Created variable %q with modify index %v", sv.Path, sv.ModifyIndex) var out string switch c.outFmt { @@ -330,11 +331,14 @@ func (c *VarPutCommand) Run(args []string) int { } case "table": // the renderSVAsUiTable func writes directly to the ui and doesn't error. + verbose(successMsg) renderSVAsUiTable(sv, c) return 0 default: + c.Ui.Output(successMsg) return 0 } + verbose(successMsg) c.Ui.Output(out) return 0 }