From 37a6331ebf0e7881ed6a0baec8f156cd20adde8b Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Sat, 6 Jul 2019 15:18:13 +0200 Subject: [PATCH] command/version: drop empty line on version check (#14858) We always add an empty line when asking/checking the version. We should only do that if there is a new version available. While this is purely cosmetic, it reads better and is consistent with packer. --- command/version.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/command/version.go b/command/version.go index b62da93bfc..9c9e30727c 100644 --- a/command/version.go +++ b/command/version.go @@ -98,18 +98,16 @@ func (c *VersionCommand) Run(args []string) int { // If we have a version check function, then let's check for // the latest version as well. if c.CheckFunc != nil { - // Separate the prior output with a newline - c.Ui.Output("") // Check the latest version info, err := c.CheckFunc() if err != nil { c.Ui.Error(fmt.Sprintf( - "Error checking latest version: %s", err)) + "\nError checking latest version: %s", err)) } if info.Outdated { c.Ui.Output(fmt.Sprintf( - "Your version of Terraform is out of date! The latest version\n"+ + "\nYour version of Terraform is out of date! The latest version\n"+ "is %s. You can update by downloading from www.terraform.io/downloads.html", info.Latest)) }