Skip to content

Commit

Permalink
cmd/vendor-install: don't silence stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Dec 8, 2023
1 parent 8b98411 commit 7ba5480
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Library/Homebrew/cmd/vendor-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#:
#: 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_MACOS_VERSION_NUMERIC and HOMEBREW_PROCESSOR are set by brew.sh
# shellcheck disable=SC2154
Expand Down Expand Up @@ -85,16 +85,6 @@ check_linux_glibc_version() {
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() {
local -a curl_args
local url
Expand Down Expand Up @@ -243,7 +233,7 @@ install() {
tar "${tar_args}" "${CACHED_LOCATION}"
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
ln -sfn "${VENDOR_VERSION}" current
if [[ -d "${VENDOR_VERSION}.reinstall" ]]
Expand Down

0 comments on commit 7ba5480

Please sign in to comment.