Thanks James - but it looks like we're going to see about creating a general task outputs framework using in-memory xml representations. I'd like to see where that discussion goes before committing this patch.

Ian

James C. Papp wrote:

Ian, here is a new version that adds attribute "outputpropertymode".  It can be
set to standard, error, or all. The default is all. I've also corrected a small
bug where I was not adding a linefeed to the output.

James.

Quoting Ian MacLean <[EMAIL PROTECTED]>:



James,
This looks good. However I'm wondering if it would be better to use
seperate properties for stderr and stdout

Ian



Here is a patch that adds two badly needed features (well..., at least for


me


:-)) to the <exec/> task.

One is resultproperty, which is used to specify a property that will receive


the


exit code of the process (it more useful when failonerror is false).

The other one is outputproperty, which is used to specify a property that


will


receive the output of the process. Unlike Ant, this includes both the


standard


and error streams and works regardless if the output has been redirected to


a


file.  This is very handy for programs like perforce were the output of the
command is needed to determine build events later on in the script.

The data return for both properties is always that last execution of the


process


(for example, if you use retrycount).

James.




--
Ian MacLean, Developer,
ActiveState, a division of Sophos
http://www.ActiveState.com






--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to