Merge pull request #2023 from hashicorp/f-current-version-checkpoint

Include the current version along side the available version.
This commit is contained in:
Sean Chittenden 2016-05-04 23:47:30 -07:00
commit 65aa46838e
1 changed files with 6 additions and 1 deletions

View File

@ -510,7 +510,12 @@ func (c *Command) checkpointResults(results *checkpoint.CheckResponse, err error
return return
} }
if results.Outdated { 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 { for _, alert := range results.Alerts {
switch alert.Level { switch alert.Level {