fix(lib): never show TEMPLATE_VERSION_ID in os name

This appears when running pfetch-rs in a podman Arch Linux container
This commit is contained in:
Adrian Groh 2023-04-08 18:52:51 +02:00
parent 145eb3dde3
commit 0ab0e5243f
Signed by: Gobidev
GPG Key ID: 3AA3153E98B0D771

View File

@ -228,7 +228,7 @@ pub fn os(general_readout: &GeneralReadout) -> Option<String> {
Some("Bedrock Linux".to_string())
} else {
match general_readout.distribution() {
Ok(distribution) => Some(distribution),
Ok(distribution) => Some(distribution.replace(" TEMPLATE_VERSION_ID", "")),
Err(_) => None,
}
}