version: properly handle vcs.modified when it's "false"

Current code will set the "dirty" field of VersionInfo always "true"
if vcs.modified flag is there. No matter whether the flag is "true" or
"false".  It will make sense to set this field due to vcs.modified
value, not only the existence of the key.

Signed-off-by: Chenyang Gao <gps949@outlook.com>
pull/8092/head
Chenyang Gao 2023-05-07 15:20:29 +08:00 committed by Brad Fitzpatrick
parent df8b1b2179
commit e8b06b2232
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ var getEmbeddedInfo = lazy.SyncFunc(func() embeddedInfo {
ret.commitDate = strings.ReplaceAll(ret.commitDate, "-", "")
}
case "vcs.modified":
ret.dirty = true
ret.dirty = s.Value == "true"
}
}
if ret.commit == "" || ret.commitDate == "" {