diff options
| author | Max Howell | 2012-08-31 10:21:06 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-31 10:22:11 -0400 |
| commit | 4dbce44218b0a407bb3e124fe98872ee54736e75 (patch) | |
| tree | 7164e8e0435441576729f2e6551618a24c4b9487 /Library | |
| parent | 0cf83d18498f81d27e4eb460f5c4ddd58dc3c6d8 (diff) | |
| download | homebrew-4dbce44218b0a407bb3e124fe98872ee54736e75.tar.bz2 | |
Refs #14558. Try to find tools when xcrun fails.
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/ENV/4.3/xcrun | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun index 3d2dd642e..49d99a644 100755 --- a/Library/ENV/4.3/xcrun +++ b/Library/ENV/4.3/xcrun @@ -4,7 +4,24 @@ # NOTE only works if they call xcrun without a full-path. Cross your fingers! if [ $HOMEBREW_SDKROOT ]; then - exec /usr/bin/xcrun "$@" + arg0="$1" + shift + + path=$(/usr/bin/xcrun -find $arg0) + [ -x "$path" ] && exec "$path" "$@" + + # Nuts, Xcode is not setup properly or something. + # Try to find the tools anyway! + path="/Applications/Xcode.app/Contents/Developer/usr/bin/$arg0" + [ -x "$path" ] && exec "$path" "$@" + path="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/$arg0" + [ -x "$path" ] && exec "$path" "$@" + + echo "Your Xcode setup is not ready. You need to either:" + echo " sudo xcode-select -switch /path/to/Xcode.app" + echo "or:" + echo " xcodebuild -license" + exit 1 else cmd="$1" shift |
