From 8cbb4803c8048169b0fd727f62bbe4d2ce7b7548 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Mon, 30 Mar 2020 23:34:17 -0400 Subject: [PATCH] Reset status on empty commands. * gash/eval.scm (exp->thunk, exps->thunk): When the expression has value '#f', reset the status. --- gash/eval.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gash/eval.scm b/gash/eval.scm index 9f20f8b..61b1ccc 100644 --- a/gash/eval.scm +++ b/gash/eval.scm @@ -59,7 +59,7 @@ ;; XXX: See comment in `exps->thunk'. (if exp (lambda () (eval-sh exp)) - noop)) + (lambda () (set-status! 0)))) (define (exps->thunk exps) ;; XXX: It probably makes more sense to exclude '#f' expressions at @@ -68,7 +68,7 @@ (match (filter values exps) (() noop) (exps (lambda () (eval-sh `( ,@exps))))) - noop)) + (lambda () (set-status! 0)))) (define (eval-sh exp) "Evaluate the Shell expression @var{exp}."