Skip to content

Commit b3c89c2

Browse files
committed
Use --quiet when invoking brew
When `brew` is used by this action, it generates a bunch of warnings which are picked up by the github actions capture system and shown for end users. They are noisy and most of them are expected. It's better to suppress them and do not alert users.
1 parent 7a757a6 commit b3c89c2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

action.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,17 @@ 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. Since some GitHub runners come with
93+
# preinstalled PostgreSQL binaries, we have to unlink them first.
94+
brew unlink --quiet postgresql@${{ inputs.postgres-version }}
95+
brew link --quiet postgresql@${{ inputs.postgres-version }}
9496
fi
9597
shell: bash
9698

0 commit comments

Comments
 (0)