aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2017-05-24 13:09:34 -0700
committerGitHub2017-05-24 13:09:34 -0700
commitc6c8725f1bbff903735bbcaaecdee5ac4b6f276b (patch)
tree051b7ea46c2be46bf140189e96873ee2ff0d09f0 /Library
parent8db299881915df3fd9d98f126fc2ff5449341c51 (diff)
parent7c7a0fc720f3d7be019b15343709fe4f45dafeff (diff)
downloadbrew-c6c8725f1bbff903735bbcaaecdee5ac4b6f276b.tar.bz2
Merge pull request #2675 from mistydemeo/vendor_compatibility_fixes
Vendor compatibility fixes
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.sh2
-rw-r--r--Library/Homebrew/cmd/vendor-install.sh8
2 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/brew.sh b/Library/Homebrew/brew.sh
index 02ce5e1c1..b76280099 100644
--- a/Library/Homebrew/brew.sh
+++ b/Library/Homebrew/brew.sh
@@ -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" = "/" ]]
diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh
index 8f08e49fb..46f0c72f9 100644
--- a/Library/Homebrew/cmd/vendor-install.sh
+++ b/Library/Homebrew/cmd/vendor-install.sh
@@ -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