我在 SO How to filter the xcodebuild command line output? 中看到了这个命令
当我们执行 xcodebuild 时,它只显示错误和警告,否则 xcodebuild 命令会将有关它正在做什么的所有内容打印到控制台。
有没有办法在 ant 任务中将 grep 与 xcodebuild 一起使用?
<exec executable="xcodebuild" failonerror="true">
<arg value="| grep error" />
<arg value="clean" />
<arg value="build" />
</exec>
上面的 exec 任务在尝试执行 ant 任务时抛出错误。
最佳答案
-quiet 不打印除警告和错误之外的任何输出
xcodebuild clean build -quiet
有效。
关于ant - xcodebuild 仅打印错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29365608/