parent
9f8b035d43
commit
1a18897723
14
src/lib.rs
14
src/lib.rs
@ -219,10 +219,20 @@ pub fn memory(memory_readout: &MemoryReadout) -> Option<String> {
|
|||||||
|
|
||||||
pub fn os(general_readout: &GeneralReadout) -> Option<String> {
|
pub fn os(general_readout: &GeneralReadout) -> Option<String> {
|
||||||
match env::consts::OS {
|
match env::consts::OS {
|
||||||
"linux" => match general_readout.distribution() {
|
"linux" => {
|
||||||
|
// check for Bedrock Linux
|
||||||
|
if dotenvy::var("PATH")
|
||||||
|
.unwrap_or_default()
|
||||||
|
.contains("/bedrock/cross/")
|
||||||
|
{
|
||||||
|
Some("Bedrock Linux".to_string())
|
||||||
|
} else {
|
||||||
|
match general_readout.distribution() {
|
||||||
Ok(distribution) => Some(distribution),
|
Ok(distribution) => Some(distribution),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
},
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
_ => match general_readout.os_name() {
|
_ => match general_readout.os_name() {
|
||||||
Ok(os) => Some(os),
|
Ok(os) => Some(os),
|
||||||
Err(_) => None,
|
Err(_) => None,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user