Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ddurieux committed Jul 6, 2024
1 parent 0098bca commit 25696e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/module/localinventory/data/cpu/dmidecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ fn parse_output(out: String) -> Vec<FinalPackageStruct> {
let mut processors = Vec::new();

// get each part of dmidecode to identify processor / processors
let out = out.replace("\r\n", "\n");
let parts = out.split("\n\n");
for part in parts {
let result = part.to_string().indent_to_json();
Expand Down Expand Up @@ -197,7 +198,7 @@ fn run_dmidecode_cmd() -> String {
// split
let empty = String::from("");
match String::from_utf8(output.stdout) {
Ok(x) => x.replace("\r\n", "\n"),
Ok(x) => x,
Err(_) => empty,
}
}
Expand Down

0 comments on commit 25696e3

Please sign in to comment.