Skip to content

Commit

Permalink
Do not override defaults with blanks (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke authored Aug 2, 2023
1 parent 2799054 commit 186e057
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ func init() {
if !ok {
return
}
Version = info.Main.Version
if info.Main.Version != "" {
Version = info.Main.Version
}
}
3 changes: 3 additions & 0 deletions modern.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func init() {
return
}
for _, kv := range info.Settings {
if kv.Value == "" {
continue
}
switch kv.Key {
case "vcs.revision":
Revision = kv.Value
Expand Down

0 comments on commit 186e057

Please sign in to comment.