2013-11-14 63 views
0

在windows 8.1中,当我运行这个时,我得到exec命令追加到输出文件的顶部。ant exec任务输出包含参数?

<exec executable="cmd" os="Windows 8" spawn="false" dir="${basedir}" output="${build.out}" error="${build.err}"> 
    <arg value="/c"/> 
    <arg line="${build.bat}" /> 
    <arg value="-p"/> 
</exec> 

输出文件看起来是这样的:

C:\yaya\the_base_dir>node C:\yaya\haha\pjsCompile.js 
//here begins the output I expected.... 

我如何从输出删除命令?为什么在那里?

如果它是有帮助的,这是运行build.bat:

node C:\yaya\haha\pjsCompile.js 

回答

2

更改build.bat这样:

@node C:\yaya\haha\pjsCompile.js 

,或者这样:

@echo off 
node C:\yaya\haha\pjsCompile.js