Skip to content

Commit

Permalink
Set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 11, 2024
1 parent 5a6463c commit 386a1c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metapkg/targets/macos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,11 @@ def prepare(self) -> None:
return

tools.cmd("brew", "update")
brew_env = "env HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1"
brew_inst = (
'if brew ls --versions "$1"; then brew upgrade "$1"; '
'else brew install "$1"; fi'
f'if brew ls --versions "$1"; '
f'then {brew_env} brew upgrade "$1"; '
f'else {brew_env} brew install "$1"; fi'
)
for tool in self._get_necessary_host_tools():
tools.cmd("/bin/sh", "-c", brew_inst, "--", tool)
Expand Down

0 comments on commit 386a1c7

Please sign in to comment.