From de0fbdda327c95e71289af3ba451f3e392758de6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 8 Aug 2020 00:45:04 +0100 Subject: [PATCH] fix exit status --- src/bin/otter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 04a8b33f..a6366283 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -123,6 +123,6 @@ fn main() { Cell::from_mut(&mut mainopts.scope); let opts = MainOpts::from_args(); */ - }.unwrap_or_else(|_already_printed| std::process::exit(12)); + }.unwrap_or_else(|rc| std::process::exit(if rc!=0 { 12 } else { 0 })); println!("{:?}", &mainopts); } -- 2.30.2