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

Undo 824c0f0d from Feb 22, and leave a comment why the thing is working.

parent cce6e8ae
No related branches found
No related tags found
No related merge requests found
...@@ -738,8 +738,6 @@ It returns a process-info plist with possible keys: ...@@ -738,8 +738,6 @@ It returns a process-info plist with possible keys:
(if (os-unix-p) (cons "exec" command) command))))) (if (os-unix-p) (cons "exec" command) command)))))
(defun %redirected-system-command (command in out err directory) ;; helper for %USE-SYSTEM (defun %redirected-system-command (command in out err directory) ;; helper for %USE-SYSTEM
(when (and directory (not (os-unix-p)))
(error "Can't change directory in run-program on non-Unix systems with system() backend"))
(flet ((redirect (spec operator) (flet ((redirect (spec operator)
(let ((pathname (let ((pathname
(typecase spec (typecase spec
...@@ -760,7 +758,7 @@ It returns a process-info plist with possible keys: ...@@ -760,7 +758,7 @@ It returns a process-info plist with possible keys:
(reduce/strcat (reduce/strcat
(append (append
before (redirect in " <") (redirect out " >") (redirect err " 2>") before (redirect in " <") (redirect out " >") (redirect err " 2>")
(when (and directory (os-unix-p)) (when (and directory (os-unix-p)) ;; NB: unless on Unix, %system uses with-current-directory
`(" ; cd " ,(escape-shell-token (native-namestring directory)))) `(" ; cd " ,(escape-shell-token (native-namestring directory))))
after))))) after)))))
......
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