Reset status on empty commands.

* gash/eval.scm (exp->thunk, exps->thunk): When the expression has
value '#f', reset the status.
This commit is contained in:
Timothy Sample 2020-03-30 23:34:17 -04:00
parent f22bc57996
commit 8cbb4803c8
1 changed files with 2 additions and 2 deletions

View File

@ -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 `(<sh-begin> ,@exps)))))
noop))
(lambda () (set-status! 0))))
(define (eval-sh exp)
"Evaluate the Shell expression @var{exp}."