update
This commit is contained in:
parent
17a137e47c
commit
4a70ffa906
6 changed files with 49 additions and 21 deletions
|
@ -16,12 +16,16 @@ fn is_root() -> bool {
|
|||
getuid() == Uid::from_raw(0)
|
||||
}
|
||||
|
||||
fn run_command(cmd: &[String], input: Option<&str>, inherit: bool) -> (String, String) {
|
||||
fn print_status(msg: &str) {
|
||||
println!(
|
||||
"{} {}",
|
||||
"-->".paint(Color::Red),
|
||||
cmd.join(" ").paint(Color::Blue.bold())
|
||||
msg.paint(Color::Blue.bold())
|
||||
);
|
||||
}
|
||||
|
||||
fn run_command(cmd: &[String], input: Option<&str>, inherit: bool) -> (String, String) {
|
||||
print_status(&cmd.join(" "));
|
||||
|
||||
let mut cmd_setup = std::process::Command::new(cmd[0].clone());
|
||||
let mut cmd_setup = cmd_setup.args(cmd.into_iter().skip(1).collect::<Vec<_>>());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue