fix empty version string for NixOS users
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
3259ea08b5
commit
daa5c34ea3
|
@ -27,5 +27,11 @@ fn init_user_agent() -> String { format!("{}/{}", name(), version()) }
|
|||
fn init_version() -> String {
|
||||
option_env!("CONDUWUIT_VERSION_EXTRA")
|
||||
.or(option_env!("CONDUIT_VERSION_EXTRA"))
|
||||
.map_or(SEMANTIC.to_owned(), |extra| format!("{SEMANTIC} ({extra})"))
|
||||
.map_or(SEMANTIC.to_owned(), |extra| {
|
||||
if extra.is_empty() {
|
||||
SEMANTIC.to_owned()
|
||||
} else {
|
||||
format!("{SEMANTIC} ({extra})")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue