Don't show "Version v" on startup if empty (#653)
We'll still show the SHA in this case
This commit is contained in:
1 parent
dfa94c7990
commit
868a65ac3d
1 file changed
+4
-2
@@ -208,9 +208,11 @@ func (b *Server) SetupMetrics(ui cli.Ui, telemetry *configutil.Telemetry) error
|
||||
}
|
||||
|
||||
func (b *Server) PrintInfo(ui cli.Ui) {
|
||||
b.InfoKeys = append(b.InfoKeys, "version")
|
||||
verInfo := version.Get()
|
||||
b.Info["version"] = verInfo.FullVersionNumber(false)
|
||||
if verInfo.Version != "" {
|
||||
b.InfoKeys = append(b.InfoKeys, "version")
|
||||
b.Info["version"] = verInfo.FullVersionNumber(false)
|
||||
}
|
||||
if verInfo.Revision != "" {
|
||||
b.Info["version sha"] = strings.Trim(verInfo.Revision, "'")
|
||||
b.InfoKeys = append(b.InfoKeys, "version sha")
|
||||
|
||||
Reference in new issue
Block a user