mirror of
https://github.com/sajenim/rush.git
synced 2025-06-28 09:54:21 +08:00
wait for child process to finish
This commit is contained in:
parent
7390caacb0
commit
03b3b3088a
1 changed files with 3 additions and 1 deletions
|
@ -28,10 +28,12 @@ fn get_args(v: Vec<&str>) -> Vec<&str> {
|
|||
}
|
||||
|
||||
fn run_command(cmd: String, args: Vec<&str>) {
|
||||
Command::new(cmd)
|
||||
let mut child = Command::new(cmd)
|
||||
.args(args)
|
||||
.spawn()
|
||||
.expect("failed to execute process");
|
||||
|
||||
child.wait().expect("failed to wait on child");
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue