[asdf-devel] Patch to asdf:run-shell-command

Gary King gwking at metabang.com
Mon May 18 23:44:34 UTC 2009


Hi Robert,

This looks good to me. What do you think of

     #+allegro
     (multiple-value-bind (stdout stderr exit-code)
         (excl.osi:command-output
	 (format nil "~a -c ~a" #+mswindows "sh" #-mswindows "/bin/sh" command)
	 :input nil :whole t
	 #+mswindows :show-window #+mswindows :hide)
       (format *verbose-out* "~{~&; ~a~%~}~%" stderr)
       (format *verbose-out* "~{~&; ~a~%~}~%" stdout)
       exit-code)

instead. This tries to address your (valid I think) concern about  
using a Bourne compatible shell, add the :show-window :hide argument  
under windows and rejiggers the printout to stick a comment #\; in  
front of each line.



On May 17, 2009, at 4:16 PM, Robert Goldman wrote:

> Bug:  Running ACL under SLIME, asdf:run-shell-command raises an error.
> The problem is that the *verbose-out* that is passed to
> run-shell-command has been bound by SLIME to a gray stream.  This is  
> not
> an acceptable argument to pass to :output for excl:run-shell-command.
>
> Here is a proposed patch.
>
> Best,
> r
>
>
> diff --git a/asdf.lisp b/asdf.lisp
> index aa1066b..82c9de3 100644
> --- a/asdf.lisp
> +++ b/asdf.lisp
> @@ -1323,7 +1323,12 @@ output to *VERBOSE-OUT*.  Returns the shell's
> exit code."
>       :input nil :output *verbose-out*))
>
>     #+allegro
> -    (excl:run-shell-command command :input nil :output *verbose-out*)
> +    (multiple-value-bind (stdout stderr exit-code)
> +        (excl.osi:command-output command :input nil :whole t)
> +      (format *verbose-out* "; ~A~%" stderr)
> +      (format *verbose-out* "; ~A~%" stdout)
> +      exit-code)
> +    ;;(excl:run-shell-command command :input nil :output *verbose- 
> out*)
>
>     #+lispworks
>     (system:call-system-showing-output
>
>
> _______________________________________________
> asdf-devel mailing list
> asdf-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel

--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM * gwking on twitter









More information about the asdf-devel mailing list