mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
Do not print git commit if empty
fix #2891 Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
bbf39350fb
commit
e98cc7a328
@ -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)
|
||||
if version.GitCommit != "" {
|
||||
fmt.Printf("commit: %s\n", version.GitCommit)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user