diff --git a/Library/Homebrew/cmd/update-reset.sh b/Library/Homebrew/cmd/update-reset.sh index a7b597afa5..f87d623b25 100644 --- a/Library/Homebrew/cmd/update-reset.sh +++ b/Library/Homebrew/cmd/update-reset.sh @@ -12,6 +12,10 @@ git() { # HOMEBREW_LIBRARY is set by bin/brew # shellcheck disable=SC2154 GIT_EXECUTABLE="$("${HOMEBREW_LIBRARY}/Homebrew/shims/shared/git" --homebrew=print-path)" + if [[ -z "${GIT_EXECUTABLE}" ]] + then + odie "Can't find a working Git!" + fi fi "${GIT_EXECUTABLE}" "$@" } diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index cf096c46f8..2bcee9996e 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -25,6 +25,10 @@ curl() { if [[ -z "${CURL_EXECUTABLE}" ]] then CURL_EXECUTABLE="$("${HOMEBREW_LIBRARY}/Homebrew/shims/shared/curl" --homebrew=print-path)" + if [[ -z "${CURL_EXECUTABLE}" ]] + then + odie "Can't find a working Curl!" + fi fi "${CURL_EXECUTABLE}" "$@" } @@ -33,6 +37,10 @@ git() { if [[ -z "${GIT_EXECUTABLE}" ]] then GIT_EXECUTABLE="$("${HOMEBREW_LIBRARY}/Homebrew/shims/shared/git" --homebrew=print-path)" + if [[ -z "${GIT_EXECUTABLE}" ]] + then + odie "Can't find a working Git!" + fi fi "${GIT_EXECUTABLE}" "$@" }