Commit 83f59b5bce356b931c690058d550265ae2c37e1e

Thomas de Grivel 2022-03-28T20:14:32

fix shell when eof

diff --git a/shell/shell.lisp b/shell/shell.lisp
index 3f3e1cc..1d87c61 100644
--- a/shell/shell.lisp
+++ b/shell/shell.lisp
@@ -137,7 +137,7 @@ Error: ~S"
     (shell-in (format nil " ; echo \"~%~A $?\"~%" delim) shell)
     (let* ((prev nil)
            (status
-            (loop (let ((line (the string (shell-out/line shell))))
+            (loop (let ((line (shell-out/line shell)))
                     (when (or (null line)
                               (and (< len (length line))
                                    (string= delim line :end2 len)))
@@ -160,7 +160,7 @@ Error: ~S"
 	  (shell-log shell "| ~A~%" line))
 	(dolist (line err)
 	  (shell-log shell "# ~A~&" line))
-        (unless (= 0 status)
+        (unless (and status (= 0 status))
           (shell-log shell   " ⇒ ~D~%" status)))
       (values status out err))))