Skip to content

Commit

Permalink
Issue influxdata#3911: Expose short version value instead of full ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
kevinconaway committed Oct 8, 2018
1 parent aabe88b commit fc79f45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,13 @@ func main() {
return
}

shortVersion := version
if shortVersion == "" {
shortVersion = "unknown"
}

// Configure version
if err := internal.SetVersion(formatFullVersion()); err != nil {
if err := internal.SetVersion(shortVersion); err != nil {
log.Println("Telegraf version already configured to: " + internal.Version())
}

Expand Down

0 comments on commit fc79f45

Please sign in to comment.