diff --git a/gash/gash.scm b/gash/gash.scm index 28f6da1..594ef61 100644 --- a/gash/gash.scm +++ b/gash/gash.scm @@ -140,7 +140,13 @@ There is NO WARRANTY, to the extent permitted by law. (write-history HOME) (newline))) (else (exit (run-repl (current-input-port) parse?)))))))) - (thunk))) + ;; Mes exits abnormally if an exception is not caught. + (cond-expand + (mes (catch 'shell-error + thunk + (lambda args + (exit 1)))) + (else (thunk))))) (cond-expand (mes (define (prompt) "$ "))