Skip to content

Commit

Permalink
Wait for script execution
Browse files Browse the repository at this point in the history
  • Loading branch information
chrsmutti committed May 2, 2020
1 parent fb54604 commit b587b69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ fn run_scripts(path: PathBuf, force: bool) -> Result<()> {

// Spawn `process::Command` for the scripts inside the directory.
for script in &scripts {
if Command::new(script).spawn().is_err() {
eprintln!("Failed to execute {:?}", script)
}
Command::new(script)
.spawn()
.context(format!("Failed to execute {:?}", script))?
.wait()?;
}

Ok(())
Expand Down

0 comments on commit b587b69

Please sign in to comment.