Skip to content

Commit

Permalink
Merge pull request #22 from atty303/propagate-exit-status
Browse files Browse the repository at this point in the history
Propagate exit status of child process to main process
  • Loading branch information
jacobdeichert authored Jul 25, 2019
2 parents 92cd3cd + 3c7b145 commit 8c58e3d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ fn main() {
return;
}

let _ = mask::executor::execute_command(chosen_cmd.unwrap());
match mask::executor::execute_command(chosen_cmd.unwrap()) {
Ok(status) => match status.code() {
Some(code) => std::process::exit(code),
None => return
},
Err(err) => eprintln!("ERROR: {}", err)
}
}

fn build_subcommands<'a, 'b>(
Expand Down

0 comments on commit 8c58e3d

Please sign in to comment.