2013-11-14 61 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