Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xcpretty should exit with an error code if it sees BUILD FAILED #370

Open
zachriggle opened this issue Oct 21, 2020 · 2 comments
Open

xcpretty should exit with an error code if it sees BUILD FAILED #370

zachriggle opened this issue Oct 21, 2020 · 2 comments

Comments

@zachriggle
Copy link

Currently, xcpretty always returns zero. It should look for "BUILD SUCCEEDED" and "BUILD FAILED" in the xcodebuild output and exit accordingly.

This makes it hard to do e.g.

if xcodebuild build foo | xcpretty; then
  do_things_with_build_results
else
  do_things_with_build_error
fi
@thermopyle
Copy link

Try set -o pipefail && xcodebuild build foo | xcpretty to get the pipe to return an error if any of the piped commands return an error.

@zachriggle
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants