Commits (2)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
(defsystem "inferior-shell" (defsystem "inferior-shell"
:description "spawn local or remote processes and shell pipes" :description "spawn local or remote processes and shell pipes"
:version "2.0.2" :version "2.0.3"
:defsystem-depends-on (:asdf #-asdf3 "uiop") :defsystem-depends-on (:asdf #-asdf3 "uiop")
:depends-on ((:version #+asdf3 "asdf" #-asdf3 "uiop" "3.0.3") ; input and error-output redirection :depends-on ((:version #+asdf3 "asdf" #-asdf3 "uiop" "3.0.3") ; input and error-output redirection
#+sbcl "sb-posix" #+sbcl "sb-posix"
......
...@@ -174,25 +174,23 @@ ...@@ -174,25 +174,23 @@
(clps-current-argument c) nil))) (clps-current-argument c) nil)))
(defun parse-process-spec (spec) (defun parse-process-spec (spec)
(macrolet ((make-sequence-instance (spec-type args) (labels ((make-sequence-instance (spec-type args)
`(make-instance (make-instance spec-type :processes
',spec-type :processes (loop :for process :in (mapcar 'parse-process-spec args)
(loop :for process :in (mapcar 'parse-process-spec ,args) :nconc (if (typep process spec-type)
:nconc (etypecase process (sequence-processes process)
(,spec-type (sequence-processes process)) (list process))))))
(sequence-spec (list process))
(command-spec (list process)))))))
(match spec (match spec
(`(pipe ,@args) (`(pipe ,@args)
(make-sequence-instance pipe-spec args)) (make-sequence-instance 'pipe-spec args))
(`(or ,@args) (`(or ,@args)
(make-sequence-instance or-spec args)) (make-sequence-instance 'or-spec args))
(`(and ,@args) (`(and ,@args)
(make-sequence-instance and-spec args)) (make-sequence-instance 'and-spec args))
(`(progn ,@args) (`(progn ,@args)
(make-sequence-instance progn-spec args)) (make-sequence-instance 'progn-spec args))
(`(fork ,@args) (`(fork ,@args)
(make-sequence-instance fork-spec args)) (make-sequence-instance 'fork-spec args))
(`(,_ ,@_) (`(,_ ,@_)
(let ((c (make-instance 'command-parse))) (let ((c (make-instance 'command-parse)))
(dolist (elem spec) (dolist (elem spec)
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
&key time show host (on-error t) &key time show host (on-error t)
&allow-other-keys) &allow-other-keys)
"run command CMD" "run command CMD"
(when (eq on-error t) (setf on-error 'signal)) (when (eq on-error t) (setf on-error 'error))
(when show (when show
(format *trace-output* "; ~A~%" (print-process-spec cmd))) (format *trace-output* "; ~A~%" (print-process-spec cmd)))
(flet ((run-it () (flet ((run-it ()
......