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

Fix run-program on clisp/win multicommand strings

Group the commands in ( parentheses ) including the optional chdir.
Update the test-run-program.script.
parent 815a1833
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
;; Implementations that rely on shell redirection on Windows also do, as a limitation.
(string-trim " " (remove (code-char 13) x)))
;;#+(and clisp os-windows) (ext:without-package-lock () (trace ext:run-shell-command))
(os-cond
((os-unix-p)
(DBG "Testing echo ok 1 via run-program as a list")
......@@ -14,12 +15,10 @@
(run-program '("echo" "ok" "1") :output '(:string :stripped t))))
((os-windows-p)
(DBG "Testing ipconfig /all via run-progam as a string")
;;; FIXME: known breakage
#+(and ecl os-windows)
(errors parameter-error
(run-program "ipconfig /all"))
#-(and ecl os-windows)
(run-program "ipconfig /all")
;; Interestingly, "ipconfig /all" fails on the msys2 bash, but not on the cygwin bash.
(nest
#+ecl (errors parameter-error) ;; FIXME: known breakage
(run-program "ipconfig /all"))
(DBG "Testing ipconfig /all via run-progam as a list")
(run-program '("ipconfig" "/all"))))
......
......@@ -409,7 +409,7 @@ or whether it's already taken care of by the implementation's underlying run-pro
(reduce/strcat
(os-cond
((os-unix-p) `(,@(when redirections `("exec " ,@redirections " ; ")) ,@chdir ,normalized))
((os-windows-p) `(,@chdir ,@redirections " " ,normalized)))))))
((os-windows-p) `(,@redirections " (" ,@chdir ,normalized ")")))))))
(defun %system (command &rest keys &key directory
input (if-input-does-not-exist :error)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment