Skip to content

Commit

Permalink
Merge pull request #16307 from Bo98/no-stderr-silence
Browse files Browse the repository at this point in the history
cmd/vendor-install: don't silence stderr
  • Loading branch information
MikeMcQuaid authored Dec 11, 2023
2 parents c32bd1c + 7ba5480 commit cf86812
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 cf86812

Please sign in to comment.