diff --git a/src/main.rs b/src/main.rs index ee2e61b..89e5eaa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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>(