Skip to content

Commit

Permalink
propagate exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
atty303 committed Jul 24, 2019
1 parent 2c0c52e commit 3c7b145
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 3c7b145

Please sign in to comment.