mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update homebrew module.
This commit is contained in:
parent
4dc598049e
commit
6412bdf003
1 changed files with 9 additions and 7 deletions
|
@ -362,16 +362,18 @@ class Homebrew(object):
|
|||
|
||||
cmd = [
|
||||
"{brew_path}".format(brew_path=self.brew_path),
|
||||
"list",
|
||||
"-m1",
|
||||
"info",
|
||||
self.current_package,
|
||||
]
|
||||
rc, out, err = self.module.run_command(cmd)
|
||||
packages = [package for package in out.split('\n') if package]
|
||||
for line in out.split('\n'):
|
||||
if (
|
||||
re.search(r'Built from source', line)
|
||||
or re.search(r'Poured from bottle', line)
|
||||
):
|
||||
return True
|
||||
|
||||
if rc == 0 and self.current_package in packages:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
return False
|
||||
|
||||
def _outdated_packages(self):
|
||||
rc, out, err = self.module.run_command([
|
||||
|
|
Loading…
Reference in a new issue