update*: check shim output
The shims _Should Not Fail_, but [when bugs happen](https://github.com/orgs/Homebrew/discussions/4331), they just cause confusing errors.
This commit is contained in:
parent
ce07d6ad31
commit
ff42a4e3b7
@ -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}" "$@"
|
||||
}
|
||||
|
||||
@ -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}" "$@"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user