2015-03-31 64 views
2

我在SO How to filter the xcodebuild command line output?xcodebuild聯編打印錯誤僅

當我們這樣做,否則xcodebuild聯編的xcodebuild聯編命令只顯示錯誤和警告打印一切控制檯關於它在做什麼看到這個命令。

有沒有一種方法可以在ant任務中使用grep與xcodebuild?

<exec executable="xcodebuild" failonerror="true"> 
       <arg value="| grep error" /> 
       <arg value="clean" /> 
       <arg value="build" /> 
    </exec> 

上面的exec任務在嘗試執行ant任務時拋出錯誤。

回答

2

This問題可能會幫助你。我也想你需要首先調用動作,然後grep。也許這將工作:

<exec dir="${projectPath}/" executable="bash" failonerror="true"> 
    <arg value="-c"/> 
    <arg value="xcodebuild clean build | grep error"/> 
</exec> 
+1

是感謝,似乎工作。但是有添加目錄的EXEC Nav 2015-03-31 10:14:42