Skip to content

Commit

Permalink
Fix the homebrew module failing because of warnings
Browse files Browse the repository at this point in the history
Instead of checking if there is an error message, which can also be a
warning, we now check the return code.

This commit fixes #8229 #7044
  • Loading branch information
Strahinja Kustudic committed May 22, 2024
1 parent 4792e21 commit 5e0a60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/homebrew.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def _current_package_is_installed(self):
if self.force_formula:
cmd.append("--formula")
rc, out, err = self.module.run_command(cmd)
if err:
if rc != 0:
self.failed = True
self.message = err.strip()
raise HomebrewException(self.message)
Expand Down

0 comments on commit 5e0a60c

Please sign in to comment.