tried to pass hddtemp executable
This commit is contained in:
parent
5ddc4274c8
commit
cb4def2aee
2 changed files with 7 additions and 3 deletions
|
@ -60,10 +60,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
}
|
||||
|
||||
match Command::new("hddtemp").output() {
|
||||
match Command::new(args.hddtemp_executable.clone()).output() {
|
||||
Ok(val) => val,
|
||||
Err(e) => {
|
||||
println!("Error running hddtemp at all: {}", e.to_string());
|
||||
println!("hddtemp = {}", args.hddtemp_executable.clone());
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
|
@ -72,7 +73,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let mut drive_temps: Vec<String> = vec![];
|
||||
|
||||
for drive in drives {
|
||||
let output = match Command::new("hddtemp").arg(drive.clone()).output() {
|
||||
let output = match Command::new(args.hddtemp_executable.clone()).arg(drive.clone()).output() {
|
||||
Ok(val) => val,
|
||||
Err(e) => {
|
||||
println!("Error running hddtemp: {}", e.to_string());
|
||||
|
@ -154,4 +155,7 @@ struct CliArgs {
|
|||
/// Path to config .toml file
|
||||
#[arg(short, long)]
|
||||
config_file: String,
|
||||
|
||||
#[arg(short, long)]
|
||||
hddtemp_executable: String,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue