brew.sh: don't call xcode-select if it doesn't exist

This commit is contained in:
Misty De Meo 2017-05-10 23:31:31 -07:00
parent 6453c81dac
commit 7c7a0fc720
No known key found for this signature in database
GPG Key ID: 76CF846A2F674B2C

View File

@ -145,7 +145,7 @@ export HOMEBREW_MACOS_VERSION
export HOMEBREW_USER_AGENT
export HOMEBREW_USER_AGENT_CURL
if [[ -n "$HOMEBREW_MACOS" ]]
if [[ -n "$HOMEBREW_MACOS" && -x "/usr/bin/xcode-select" ]]
then
XCODE_SELECT_PATH=$('/usr/bin/xcode-select' --print-path 2>/dev/null)
if [[ "$XCODE_SELECT_PATH" = "/" ]]