Merge pull request #16307 from Bo98/no-stderr-silence
cmd/vendor-install: don't silence stderr
This commit is contained in:
commit
cf8681247f
@ -3,7 +3,7 @@
|
|||||||
#:
|
#:
|
||||||
#: Install Homebrew's portable Ruby.
|
#: Install Homebrew's portable Ruby.
|
||||||
|
|
||||||
# HOMEBREW_CURLRC, HOMEBREW_LIBRARY, HOMEBREW_STDERR is from the user environment
|
# HOMEBREW_CURLRC, HOMEBREW_LIBRARY is from the user environment
|
||||||
# HOMEBREW_CACHE, HOMEBREW_CURL, HOMEBREW_LINUX, HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION, HOMEBREW_MACOS,
|
# HOMEBREW_CACHE, HOMEBREW_CURL, HOMEBREW_LINUX, HOMEBREW_LINUX_MINIMUM_GLIBC_VERSION, HOMEBREW_MACOS,
|
||||||
# HOMEBREW_MACOS_VERSION_NUMERIC and HOMEBREW_PROCESSOR are set by brew.sh
|
# HOMEBREW_MACOS_VERSION_NUMERIC and HOMEBREW_PROCESSOR are set by brew.sh
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
@ -85,16 +85,6 @@ check_linux_glibc_version() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Execute the specified command, and suppress stderr unless HOMEBREW_STDERR is set.
|
|
||||||
quiet_stderr() {
|
|
||||||
if [[ -z "${HOMEBREW_STDERR}" ]]
|
|
||||||
then
|
|
||||||
command "$@" 2>/dev/null
|
|
||||||
else
|
|
||||||
command "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
local -a curl_args
|
local -a curl_args
|
||||||
local url
|
local url
|
||||||
@ -243,7 +233,7 @@ install() {
|
|||||||
tar "${tar_args}" "${CACHED_LOCATION}"
|
tar "${tar_args}" "${CACHED_LOCATION}"
|
||||||
safe_cd "${VENDOR_DIR}/portable-${VENDOR_NAME}"
|
safe_cd "${VENDOR_DIR}/portable-${VENDOR_NAME}"
|
||||||
|
|
||||||
if quiet_stderr "./${VENDOR_VERSION}/bin/${VENDOR_NAME}" --version >/dev/null
|
if "./${VENDOR_VERSION}/bin/${VENDOR_NAME}" --version >/dev/null
|
||||||
then
|
then
|
||||||
ln -sfn "${VENDOR_VERSION}" current
|
ln -sfn "${VENDOR_VERSION}" current
|
||||||
if [[ -d "${VENDOR_VERSION}.reinstall" ]]
|
if [[ -d "${VENDOR_VERSION}.reinstall" ]]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user