Commit ba8308da authored by Francois-Rene Rideau's avatar Francois-Rene Rideau
Browse files

Try to avoid extraneous spaces in redirected command lines

for the sake of Windows' CMD.EXE.
parent be8dbc58
...@@ -736,10 +736,10 @@ It returns a process-info plist with possible keys: ...@@ -736,10 +736,10 @@ It returns a process-info plist with possible keys:
(string (pathname spec)) (string (pathname spec))
(pathname spec) (pathname spec)
((eql :output) ((eql :output)
(assert (equal operator "2>")) (assert (equal operator " 2>"))
(return-from redirect '(" 2>&1")))))) (return-from redirect '(" 2>&1"))))))
(when pathname (when pathname
(list " " operator " " (list operator " "
(escape-shell-token (native-namestring pathname))))))) (escape-shell-token (native-namestring pathname)))))))
(multiple-value-bind (before after) (multiple-value-bind (before after)
(let ((normalized (%normalize-system-command command))) (let ((normalized (%normalize-system-command command)))
...@@ -748,7 +748,7 @@ It returns a process-info plist with possible keys: ...@@ -748,7 +748,7 @@ It returns a process-info plist with possible keys:
(values (list normalized) ()))) (values (list normalized) ())))
(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)) `("cd " (escape-shell-token directory) " ; ")) (when (and directory (os-unix-p)) `("cd " (escape-shell-token directory) " ; "))
after))))) after)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment