mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use "brew list <name>" instead of grepping the output of "brew list".
Some brew packages are not listed with their package name, e.g. libjpeg.
This commit is contained in:
parent
89abc35e59
commit
279098bd03
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ def query_package(module, brew_path, name, state="present"):
|
||||||
""" Returns whether a package is installed or not. """
|
""" Returns whether a package is installed or not. """
|
||||||
|
|
||||||
if state == "present":
|
if state == "present":
|
||||||
rc, out, err = module.run_command("%s list -m1 | grep -q '^%s$'" % (brew_path, name))
|
rc, out, err = module.run_command("%s list %s" % (brew_path, name))
|
||||||
if rc == 0:
|
if rc == 0:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue