aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2017-05-23 18:34:16 -0700
committerMisty De Meo2017-05-23 18:36:25 -0700
commitb8fee7fe4d727a624943212ae21113a00e1e1e2f (patch)
treeb5e555cf2772e58a9338f2c71b02c3caa87124dd /Library
parentfdd9972aa7c6267fad8c5648a203d0e24a6fdf0a (diff)
downloadbrew-b8fee7fe4d727a624943212ae21113a00e1e1e2f.tar.bz2
vendor-install: check -x on output of which
This works around older versions of `which`, which return a string on failure.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/vendor-install.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh
index 8f08e49fb..9ab004ee8 100644
--- a/Library/Homebrew/cmd/vendor-install.sh
+++ b/Library/Homebrew/cmd/vendor-install.sh
@@ -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