fix exit-status in `command'

This commit is contained in:
Jan Nieuwenhuizen 2018-07-14 09:46:30 +02:00
parent ff985aa083
commit 42fbcb942a
1 changed files with 6 additions and 2 deletions

View File

@ -311,9 +311,13 @@
(define (exec command)
(cond ((procedure? command) command)
((every string? command)
(cut apply (compose (cut equal? 0 <>)
(compose (cut assignment "?" <>) number->string)
(cut apply (compose (cut warn 'end-val <>)
(lambda (status)
((compose (cut assignment "?" <>) number->string) status)
status)
(cut warn 'exit-val <>)
status:exit-val
(cut warn 'status <>)
system*) command))
(else (lambda () #t))))
(exec (append-map glob args)))