Skip to content

Commit

Permalink
Make brew errors non-fatal
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 11, 2024
1 parent c732cba commit 2310bc5
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,14 +303,16 @@ def prepare(self) -> None:
return

tools.cmd("brew", "update")
brew_env = "env HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1"
brew_env = "env HOMEBREW_NO_AUTO_UPDATE=1"
brew_inst = (
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)
tools.cmd(
"/bin/sh", "-c", brew_inst, "--", tool, errors_are_fatal=False
)

def is_binary_code_file(
self, build: targets.Build, path: pathlib.Path
Expand Down

0 comments on commit 2310bc5

Please sign in to comment.