mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 02:21:34 +00:00
Merge pull request #2892 from justincormack/no-commit
Do not print git commit if empty
This commit is contained in:
commit
a7620b7604
@ -47,7 +47,9 @@ func (f *infoFormatter) Format(entry *log.Entry) ([]byte, error) {
|
|||||||
|
|
||||||
func printVersion() {
|
func printVersion() {
|
||||||
fmt.Printf("%s version %s\n", filepath.Base(os.Args[0]), version.Version)
|
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)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user