Merge pull request #15034 from gromgit/update/check-shim-output

update*: check shim output
This commit is contained in:
Mike McQuaid 2023-03-22 13:29:14 +00:00 committed by GitHub
commit cb24395a9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -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}" "$@"
}

View File

@ -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}" "$@"
}