From a94bd19362cbe416965c44d2988a38badffb143d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 4 Jan 2022 11:55:00 +0100 Subject: [PATCH] repos: Set error code correctly when status fails --- src/grm/main.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/grm/main.rs b/src/grm/main.rs index d54f45c..9a2996a 100644 --- a/src/grm/main.rs +++ b/src/grm/main.rs @@ -50,7 +50,10 @@ fn main() { print_error(&format!("Error: {}", error)); } } - Err(error) => print_error(&format!("Error getting status: {}", error)), + Err(error) => { + print_error(&format!("Error getting status: {}", error)); + process::exit(1); + } } } None => { @@ -69,7 +72,10 @@ fn main() { print_warning(&warning); } } - Err(error) => print_error(&format!("Error getting status: {}", error)), + Err(error) => { + print_error(&format!("Error getting status: {}", error)); + process::exit(1); + } } } }, @@ -239,7 +245,10 @@ fn main() { print_error(&format!("Error: {}", error)); } } - Err(error) => print_error(&format!("Error getting status: {}", error)), + Err(error) => { + print_error(&format!("Error getting status: {}", error)); + process::exit(1); + } } } cmd::WorktreeAction::Convert(_args) => {