aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 1e44b058..0649da9e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -473,8 +473,11 @@ fn main() -> io::Result<()> {
std::process::exit(2);
}
- if let cli::CommandOutcome::Handled(code) = cli::maybe_run(&args)? {
- std::process::exit(code);
+ match cli::maybe_run(&args) {
+ Ok(cli::CommandOutcome::Handled(code)) => std::process::exit(code),
+ Ok(cli::CommandOutcome::NotCli) => {}
+ Err(err) if cli::protocol_mismatch_was_reported(&err) => std::process::exit(1),
+ Err(err) => return Err(err),
}
// Subcommands and flags (no TUI, no logging needed)