Skip to content

Commit 3e4d1e0

Browse files
authored
Merge pull request #48 from ikalnytskyi/chore/brew-quiet
Suppress Homebrew warnings
2 parents 7a757a6 + 0fdf1da commit 3e4d1e0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,20 @@ runs:
8282
echo "PQ_LIB_DIR=$PG_LIBDIR" >> $GITHUB_ENV
8383
8484
elif [ "$RUNNER_OS" == "macOS" ]; then
85+
export HOMEBREW_NO_ENV_HINTS=1
8586
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
8687
export HOMEBREW_NO_INSTALL_CLEANUP=1
8788
export HOMEBREW_NO_INSTALL_UPGRADE=1
88-
brew install --skip-post-install postgresql@${{ inputs.postgres-version }}
89+
brew install --quiet --skip-post-install postgresql@${{ inputs.postgres-version }}
8990
9091
# Link PostgreSQL binaries from /usr/local/bin in order to make them
91-
# available globally. The overwrite option is required since some
92-
# GitHub runners come with preinstalled PostgreSQL binaries.
93-
brew link --overwrite postgresql@${{ inputs.postgres-version }}
92+
# available globally. The --overwrite option is required since some
93+
# GitHub runners come with preinstalled PostgreSQL binaries, and we
94+
# have to link the required version of PostgreSQL. The unlinking step
95+
# is needed to suppress "Already linked" warning which is propagated
96+
# back to users.
97+
brew unlink --quiet postgresql@${{ inputs.postgres-version }}
98+
brew link --quiet --overwrite postgresql@${{ inputs.postgres-version }}
9499
fi
95100
shell: bash
96101

0 commit comments

Comments
 (0)