Merge pull request #2892 from justincormack/no-commit

Do not print git commit if empty
This commit is contained in:
Justin Cormack 2018-01-29 10:08:33 +00:00 committed by GitHub
commit a7620b7604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,9 @@ func (f *infoFormatter) Format(entry *log.Entry) ([]byte, error) {
func printVersion() {
fmt.Printf("%s version %s\n", filepath.Base(os.Args[0]), version.Version)
fmt.Printf("commit: %s\n", version.GitCommit)
if version.GitCommit != "" {
fmt.Printf("commit: %s\n", version.GitCommit)
}
os.Exit(0)
}