mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
Fix the homebrew module failing because of warnings (#8406)
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 Co-authored-by: Strahinja Kustudic <strahinjak@nordeus.com>
This commit is contained in:
parent
d96b2642bc
commit
43cb5a0d54
3 changed files with 4 additions and 16 deletions
|
@ -415,9 +415,9 @@ class Homebrew(object):
|
|||
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()
|
||||
self.message = err.strip() or ("Unknown failure with exit code %d" % rc)
|
||||
raise HomebrewException(self.message)
|
||||
data = json.loads(out)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue