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

Punt on the final space emitted by CMD.EXE's echo on Windows.

It's not just present in buggy implementations,
it's inevitable on all implementations that rely on shell redirection.
parent eb8a5245
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
(defun dewindowize (x) (defun dewindowize (x)
(block () (block ()
(setf x (remove (code-char 13) x)) (setf x (remove (code-char 13) x))
#+(and (or sbcl lispworks) os-windows) ;; buggy implementations output extra space on Windows. Also old CCL. ;; Some buggy implementations output extra space on Windows;
;; Implementations that rely on shell redirection on Windows also do, as a limitation.
(when (eql #\space (last-char x)) (when (eql #\space (last-char x))
(return (subseq x 0 (1- (length x))))) (return (subseq x 0 (1- (length x)))))
x)) x))
......
...@@ -760,7 +760,7 @@ It returns a process-info plist with possible keys: ...@@ -760,7 +760,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)))))
......
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