There is a workaround, but it's a bit messy.  You can execute your
command indirectly via the command shell and pipe the output to your log
file.  

 

E.g.:

 

<exec program="C:\WINDOWS\system32\cmd.exe" commandline="/C svn.exe log
&gt; svn.log"/>

 

Regards,

 

Alex.

 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gert
Driesen
Sent: Wednesday, July 02, 2008 7:09 PM
To: 'Chris Lambrou'; nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Avoiding console output when running an
<exec/>task

 

Chris,

 

Currently this is not possible. However, I'm strongly considering
changing this behavior (even if this is a breaking change).

 

Gert

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris
Lambrou
Sent: woensdag 2 juli 2008 18:02
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Avoiding console output when running an <exec/>
task

 

Hi,

 

I'm using the exec task to generate a Subversion log file for my current
checkout folder, which I would normally do from the command line as
follows:

 

svn.exe log >svn.log

 

Note that the Subversion log file is obtained by redirecting the
standard output of svn.exe to a file. I can achieve the same effect with
the NAnt exec task by setting the task's output property, like this:

 

<exec program="svn.exe" commandline="log" output="svn.log"/>

 

The problem is that the exec task echoes all of the output from the
svn.exe command to the NAnt console, which fills my NAnt console and log
file with cruft. Does anyone know how to avoid this?

 

Chris

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to