From 01b8311c945cfed18c61167d67d3736b237f191d Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 4 May 2016 22:57:44 -0700 Subject: [PATCH] Include the current version along side the available version. When checkpoint emits a log message indicating an agent is out of date, include the current version along with the available version according to checkpoint. Inspired by: log output in #993 --- command/agent/command.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/command/agent/command.go b/command/agent/command.go index efeec1ceb1..b59e0a88de 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -510,7 +510,12 @@ func (c *Command) checkpointResults(results *checkpoint.CheckResponse, err error return } if results.Outdated { - c.Ui.Error(fmt.Sprintf("Newer Consul version available: %s", results.CurrentVersion)) + versionStr := c.Version + if c.VersionPrerelease != "" { + versionStr += fmt.Sprintf("-%s", c.VersionPrerelease) + } + + c.Ui.Error(fmt.Sprintf("Newer Consul version available: %s (currently running: %s)", results.CurrentVersion, versionStr)) } for _, alert := range results.Alerts { switch alert.Level {