The current implementation isn't very resilient when it comes to the output of xcrun. Currently it cannot deal with:
- Trailing newlines.
- Leading newlines and errors/warnings before the Xcode path.
- Xcode not being named Xcode.app.
This extract the logic into a helper in PlatformMacOSX and fixes those issues.
Can you add a comment like:
/// path/to/Xcode.app/Developer/... so it's easier to visualize what these are?