Small refactors.

This commit is contained in:
r-vdp 2023-03-22 23:15:41 +01:00
parent fe41f93e82
commit e60fa080b4
No known key found for this signature in database

View file

@ -1,7 +1,7 @@
use std::process::{self, ExitCode};
use anyhow::Result; use anyhow::Result;
use clap::Parser; use clap::Parser;
use std::ffi::OsString;
use std::process::{self, ExitCode};
use system_manager::StorePath; use system_manager::StorePath;
@ -227,7 +227,14 @@ fn invoke_remote_script(
cmd.arg("sudo"); cmd.arg("sudo");
} }
let status = cmd let status = cmd
.arg(format!("{store_path}/bin/{script_name}")) .arg(OsString::from(
store_path
.store_path
.join("bin")
.join(script_name)
.to_string_lossy()
.into_owned(),
))
.stdout(process::Stdio::inherit()) .stdout(process::Stdio::inherit())
.stderr(process::Stdio::inherit()) .stderr(process::Stdio::inherit())
.status()?; .status()?;