Files
guru/media-video/walksnail-osd-tool/files/walksnail-osd-tool-0.3.0-version-parse-fix.patch
2024-03-27 22:50:31 -04:00

15 lines
645 B
Diff

diff --git a/ui/src/util.rs b/ui/src/util.rs
index e59188c..0a778c4 100644
--- a/ui/src/util.rs
+++ b/ui/src/util.rs
@@ -248,7 +248,8 @@ pub mod build_info {
}
pub fn get_version() -> Build {
- let version: Option<Version> = option_env!("GIT_VERSION").and_then(|s| Version::parse(s).ok());
+ // remove the preceding 'v' from the version which throws the parse off
+ let version: Option<Version> = option_env!("GIT_VERSION").and_then(|s| Version::parse(&s[1..]).ok());
let short_hash: Option<&'static str> = option_env!("GIT_COMMIT_HASH");
match (version, short_hash.map(|s| s.to_string())) {