Skip to content

Commit 5e06796

Browse files
committed
chore: fix tool parsing
Signed-off-by: James Petersen <jpetersenames@gmail.com>
1 parent da96e49 commit 5e06796

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

src/hardware.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use super::{
33
CheckResultValue::{Errored, Failed, Passed},
44
};
55

6-
use log::debug;
76
use std::path::{Path, PathBuf};
87
use std::process::Command;
98

@@ -45,15 +44,9 @@ impl HardwareChecks {
4544
let name = format!("Record {tool}");
4645

4746
let mut tool_args: Vec<&str> = tool.split(" ").collect();
48-
debug!("{:#?}", tool_args);
49-
let cmd = tool_args.pop();
50-
if cmd.is_none() {
51-
return CheckResult::new(&name, Errored(format!("failed to parse command {tool}")));
52-
}
53-
let cmd = cmd.unwrap();
47+
let cmd = tool_args.remove(0);
5448

5549
let output = Command::new(cmd).args(tool_args).output();
56-
debug!("{:#?}", output);
5750
if let Err(e) = output {
5851
return CheckResult::new(&name, Errored(e.to_string()));
5952
}
@@ -70,7 +63,7 @@ impl HardwareChecks {
7063
}
7164

7265
fn record_lspci(&self) -> CheckResult {
73-
self.run_tool("lspci")
66+
self.run_tool("lspci -vvv")
7467
}
7568

7669
fn record_dmidecode(&self) -> CheckResult {

src/system/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use super::{
33
CheckResultValue::{Errored, Failed, Passed},
44
};
55

6-
use log::{debug, info, warn};
6+
use log::debug;
77
use sysinfo::{Disks, System};
88

99
const GROUP_IDENTIFIER: &str = "SystemChecks";

0 commit comments

Comments
 (0)