Skip to content

Commit 2ed23bb

Browse files
authored
Merge pull request #1527 from ychin/ci-dont-warn-on-cached-package
ci: Minor fix so that if gettext/libsodium is cached, don't warn
2 parents fd1c3fc + 7fa7edd commit 2ed23bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/actions/universal-package/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ runs:
7272
# which cause brew install to return non-zero and fail the build.
7373
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
7474
75-
# This will be a no-op if formula was cached
76-
brew install --quiet --formula -s ./${formula}.rb
75+
# This will be a no-op if formula was cached. We check if the package
76+
# exists first just to avoid an "already installed" warning.
77+
brew list ${formula} &>/dev/null || brew install --quiet --formula -s ./${formula}.rb
7778
7879
# If formula was cached, this step is necessary to relink it to brew prefix (e.g. /usr/local)
7980
brew unlink ${formula} && brew link ${formula}

0 commit comments

Comments
 (0)