ant - xcodebuild 仅打印错误

标签 ant xcodebuild

我在 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/

相关文章:

java - 如何在不支持 "alien"嵌套元素的 ant 任务中使用宏

ios - 选择或获取应用程序的 xcodebuild 目标目录

java - "No suitable method found for sort(List<VarStatusMsg<? extends Number>>)"JDK错误

java - 我可以在 Ant 脚本中声明和初始化变量吗?

java - ANT eclipse headless 构建 - java.lang.NoClassDefFoundError

linux - ant 命令在 Eclipse 中运行,但不能在 linux 命令行中运行

xcconfig 中的 iOS 链接库

ios - 使用 xcodebuild 通过命令行设置 "OTHER_LDFLAGS"

ios - 特拉维斯 : xcodebuild: error: Unable to find a destination matching the provided destination specifier

ios - 添加自定义build设置时,xcodebuild 存档生成格式错误的 xcarchive