I came across an interesting Xcode behavior with startup scripts where it truncates error and warning messages if they have a square bracket with text at the end of the message.
Run script example:
echo "warning: before [in brackets]"
echo "warning: before in brackets]"
echo "warning: before [in brackets"
echo "warning: before [in brackets] after"
echo "error: before [in brackets]"
echo "error: before in brackets]"
echo "error: before [in brackets"
echo "error: before [in brackets] after"
exit 1
Screenshot of the build log:

Is there a good reason why he does this, and is it possible to quote or avoid the message in any way? I tried a bunch of different quotes and escapes without success.
I tested only with Xcode 4.4.1.
source
share