From d376820831f47005535c19fb8f24eadb44fe1dd2 Mon Sep 17 00:00:00 2001 From: Elias Pipping Date: Sun, 20 Nov 2016 21:35:38 +0000 Subject: [PATCH] Do not use %cmd-shell-pathname With ECL it causes problems. On other platforms it should not be necessary. This gets run-program with ECL on windows far closer to working again --- uiop/run-program.lisp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/uiop/run-program.lisp b/uiop/run-program.lisp index d8758b06..1355767e 100644 --- a/uiop/run-program.lisp +++ b/uiop/run-program.lisp @@ -338,15 +338,6 @@ Programmers are encouraged to define their own methods for this generic function (subprocess-error-command condition) (subprocess-error-code condition))))) - ;;; find CMD.exe on windows - (defun %cmd-shell-pathname () - (os-cond - ((os-windows-p) - (strcat (native-namestring (getenv-absolute-directory "WINDIR")) - "System32\\cmd.exe")) - (t - (error "CMD.EXE is not the command shell for this OS.")))) - ;;; Internal helpers for run-program (defun %normalize-command (command) "Given a COMMAND as a list or string, transform it in a format suitable @@ -362,7 +353,7 @@ for the implementation's underlying run-program function" ;; r15398 or later in 1.9 or later, ;; so that bug 858 is fixed http://trac.clozure.com/ccl/ticket/858 #+clozure (cons "cmd" (strcat "/c " command)) - #+sbcl (cons (%cmd-shell-pathname) (strcat "/c " command)) + #+sbcl (cons "cmd" (strcat "/c " command)) ;; NB: On other Windows implementations, this is utterly bogus ;; except in the most trivial cases where no quoting is needed. ;; Use at your own risk. @@ -965,7 +956,7 @@ or :error-output." (os-cond ((os-windows-p) #+(or allegro clisp ecl) - (strcat (%cmd-shell-pathname) " /c " command) + (strcat "cmd" " /c " command) #-(or allegro clisp ecl) command) (t command))) (list (escape-shell-command @@ -973,7 +964,7 @@ or :error-output." ((os-unix-p) (cons "exec" command)) ((os-windows-p) #+(or allegro clisp ecl sbcl) - (list* (%cmd-shell-pathname) "/c" command) + (list* "cmd" "/c" command) #-(or allegro clisp ecl sbcl) command) (t command)))))) -- GitLab