Xcode ignores error returns from Archive Pre-action scripts

Number:rdar://31707372 Date Originated:2017/04/19
Status:Duplicate/9139716 Resolved:
Product:Xcode Product Version:8.3.1 (8E1000a)
Classification: Reproducible:Always
There appears to be no way to cause an Archive action failure by returning an error from a Pre-action script. Output to stderr is ignored, as are non-zero exit values.
This is highly undesirable because any script failure is very difficult to notice/find.

Steps to Reproduce:
Add a new Run Script Action under the Archive action's "Pre-actions" section. The script can be as simple as "exit 1". For fun, echo some text to stderr.

Expected Results:
A non-zero exit code from a Pre-action script should cause the Archive action to fail. Output to stderr (or even stdout) should be shown in the build log.

Actual Results:
The failure is completely ignored. No output is shown in the build log.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!