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

Improve error behavior.

Support clozure for mkdir and setenv (need to be moved away).
parent d9856403
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@
(function
(apply 'run-process-spec (funcall host spec) :host nil keys))))
(defun run (cmd &key on-error time (output t) show host)
(defun run (cmd &key time (output t) show host (on-error (list "Command ~S failed~@[ on ~A~]" cmd host)))
(labels ((process-time ()
(if time (time (process-command)) (process-command)))
(process-command ()
......
......@@ -5,12 +5,16 @@
;;--- TODO: move these to FARE-UTILS and/or XCVB-DRIVER ?
(defun make-directory (dir &optional (mode #o755))
;; TODO: move to fare-utils or somewhere else
;; TODO: it's low-level. rename this mkdir or some such, and document use of native-namestring.
#+clozure (ccl::%mkdir dir mode)
#+sbcl (sb-posix:mkdir dir mode)
#-sbcl (NIY 'make-directory))
#-(or clozure sbcl) (NIY 'make-directory))
(defun setenv (var val &optional (overwritep t))
#+clozure (ccl:setenv var val overwritep)
#+sbcl (sb-posix:setenv var val (if overwritep 1 0))
#-sbcl (NIY 'setenv))
#-(or clozure sbcl) (NIY 'setenv))
(defmacro pipe (values &rest transformers)
(if (null transformers)
......
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