Merge pull request #2675 from mistydemeo/vendor_compatibility_fixes

Vendor compatibility fixes
This commit is contained in:
Misty De Meo 2017-05-24 13:09:34 -07:00 committed by GitHub
commit c6c8725f1b
2 changed files with 5 additions and 5 deletions

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" = "/" ]]

View File

@ -39,10 +39,10 @@ fetch() {
if [[ -n "$HOMEBREW_QUIET" ]]
then
curl_args+=(--silent)
curl_args[${#curl_args[*]}]="--silent"
elif [[ -z "$HOMEBREW_VERBOSE" ]]
then
curl_args+=(--progress-bar)
curl_args[${#curl_args[*]}]="--progress-bar"
fi
temporary_path="$CACHED_LOCATION.incomplete"
@ -76,10 +76,10 @@ fetch() {
trap - SIGINT
fi
if [[ -n "$(which shasum)" ]]
if [[ -x "$(which shasum)" ]]
then
sha="$(shasum -a 256 "$CACHED_LOCATION" | cut -d' ' -f1)"
elif [[ -n "$(which sha256sum)" ]]
elif [[ -x "$(which sha256sum)" ]]
then
sha="$(sha256sum "$CACHED_LOCATION" | cut -d' ' -f1)"
else