mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
remove: unnecesary code
This commit is contained in:
parent
54b81e0e0f
commit
6bd55fb316
1 changed files with 2 additions and 6 deletions
|
|
@ -50,15 +50,11 @@ pub fn find_last_command(shell: &str) -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn command_output(shell: &str, command: &str) -> String {
|
pub fn command_output(shell: &str, command: &str) -> String {
|
||||||
println!("Running command: {}", command);
|
|
||||||
let output = std::process::Command::new(shell)
|
let output = std::process::Command::new(shell)
|
||||||
.arg("-c")
|
.arg("-c")
|
||||||
.arg(command)
|
.arg(command)
|
||||||
.stderr(std::process::Stdio::piped())
|
.output()
|
||||||
.spawn()
|
.expect("failed to execute process");
|
||||||
.expect("failed to execute process")
|
|
||||||
.wait_with_output()
|
|
||||||
.expect("failed to wait on process");
|
|
||||||
|
|
||||||
String::from_utf8_lossy(&output.stderr)
|
String::from_utf8_lossy(&output.stderr)
|
||||||
.to_string()
|
.to_string()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue