Xcode 不检测预操作是否失败是否正常? [英] Is it normal for Xcode not to detect if a pre-action failed?

查看:26
本文介绍了Xcode 不检测预操作是否失败是否正常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Xcode 4 并且我向 run 方案添加了一个预操作,一个 bash 脚本,但似乎 Xcode 忽略了脚本的退出状态并且总是运行,即使退出代码不为零.

I am using Xcode 4 and I added an preaction to the run scheme, a bash script, but it seems that Xcode is ignoring the exit status of the script and always run, even if the exit code is not zero.

这正常吗?对于添加自定义步骤(可能会失败),我有哪些替代方法?

Is this normal? What alternatives do I have for adding a custom step, one that can fail?

更新:我还尝试了 exit 1 用于构建的后期操作,但结果相同,总是在没有任何反馈的情况下执行.

Update: I also tried exit 1 for post-action for build but with the same results, always executing without any feedback.

如何进行自定义步骤以将构建标记为失败?

How can I make a custom step that can mark the build as failed?

推荐答案

它不仅似乎不关心 pre-/post-action 脚本退出状态,而且似乎也不将输出放入 build/运行日志.我认为在 Apple 的 Xcode 4 开发论坛中,有两个关于此问题的独立主题.没有说明这是错误还是功能.

Not only does it not seem to care about pre-/post-action script exit status, but it doesn't seem to place the output into the build/run logs either. There are I think two separate threads about this buried in Apple's Xcode 4 dev forums. No word on whether this is a bug or a feature.

这篇关于Xcode 不检测预操作是否失败是否正常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆