diff --git a/command/agent/command.go b/command/agent/command.go index 96b2a0ef9d..6c16dd6d31 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -357,9 +357,13 @@ func (c *Command) setupAgent(config *Config, logOutput io.Writer, logWriter *log // Setup update checking if !config.DisableUpdateCheck { + version := config.Version + if config.VersionPrerelease != "" { + version += fmt.Sprintf("-%s", config.VersionPrerelease) + } updateParams := &checkpoint.CheckParams{ Product: "consul", - Version: fmt.Sprintf("%s%s", config.Version, config.VersionPrerelease), + Version: version, } if !config.DisableAnonymousSignature { updateParams.SignatureFile = filepath.Join(config.DataDir, "checkpoint-signature")