Merge pull request #14683 from MikeMcQuaid/no_homebrew_core_version

cmd/--version: don't always output homebrew/core.
This commit is contained in:
Mike McQuaid 2023-02-17 14:11:53 +00:00 committed by GitHub
commit a62112f894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,7 +27,11 @@ version_string() {
homebrew-version() {
echo "Homebrew ${HOMEBREW_VERSION}"
echo "Homebrew/homebrew-core $(version_string "${HOMEBREW_CORE_REPOSITORY}")"
if [[ -n "${HOMEBREW_NO_INSTALL_FROM_API}" || -d "${HOMEBREW_CORE_REPOSITORY}" ]]
then
echo "Homebrew/homebrew-core $(version_string "${HOMEBREW_CORE_REPOSITORY}")"
fi
if [[ -d "${HOMEBREW_CASK_REPOSITORY}" ]]
then