diff --git a/Library/Homebrew/cmd/vendor-install.sh b/Library/Homebrew/cmd/vendor-install.sh index 695a538c03..d173754175 100644 --- a/Library/Homebrew/cmd/vendor-install.sh +++ b/Library/Homebrew/cmd/vendor-install.sh @@ -186,21 +186,33 @@ EOS if [[ -x "/usr/bin/shasum" ]] then sha="$(/usr/bin/shasum -a 256 "${CACHED_LOCATION}" | cut -d' ' -f1)" - elif [[ -x "$(type -P sha256sum)" ]] + fi + + if [[ -z "${sha}" && -x "$(type -P sha256sum)" ]] then sha="$(sha256sum "${CACHED_LOCATION}" | cut -d' ' -f1)" - elif [[ -x "$(type -P ruby)" ]] + fi + + if [[ -z "${sha}" ]] then - sha="$( - ruby <