Skip to content
Snippets Groups Projects
Commit 9984a223 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

2.0.1: for on-error, use call-function not error-behaviour.

It's more general, but it's also SLIGHTLY INCOMPATIBLE,
depending on values provided. So BEWARE!
parent 1413d010
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
(defsystem "inferior-shell"
:description "spawn local or remote processes and shell pipes"
:version "2.0.0"
:version "2.0.1"
:defsystem-depends-on (:asdf #-asdf3 "uiop")
:depends-on ((:version #+asdf3 "asdf" #-asdf3 "uiop" "3.0.3") ; input and error-output redirection
#+sbcl "sb-posix"
......
......@@ -52,15 +52,15 @@
(apply 'run-process-spec (funcall host spec) :host nil keys))))
(defun run/nil (cmd &rest keys
&key time show host
(on-error (list "Command ~S failed~@[ on ~A~]" cmd host))
&allow-other-keys)
&key time show host
(on-error 'signal)
&allow-other-keys)
"run command CMD"
(labels ((process-time ()
(if time (time (process-command)) (process-command)))
(process-command ()
(handler-bind
((subprocess-error #'(lambda (c) (error-behavior on-error c))))
((subprocess-error #'(lambda (c) (call-function on-error c))))
(apply 'run-process-spec cmd :ignore-error-status nil :host host keys))))
(when show
(format *trace-output* "; ~A~%" (print-process-spec cmd)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment