From 4450a52275907043a5a05d0f3c7b67fd7bcf1003 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 19 Sep 2022 01:52:26 +0530 Subject: bin: Print error message and exit on user-error conditions. This allows us to report fatal user errors and exit. * bin/tissue (main): Print error message and exit on user-error conditions. --- bin/tissue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/tissue b/bin/tissue index 39c15e0..4e59d73 100755 --- a/bin/tissue +++ b/bin/tissue @@ -506,7 +506,12 @@ Pull latest from upstream repositories. => (lambda (git-error) (display (git-error-message git-error) (current-error-port)) (newline (current-error-port)) - (exit #f)))) + (exit #f))) + ((and (user-error-condition? c) + (message-condition? c)) + (display (condition-message c) (current-error-port)) + (newline (current-error-port)) + (exit #f))) (match args ((_ (or "-h" "--help")) (print-usage)) -- cgit v1.2.3