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:
Dag Høidahl 2014-01-03 15:15:20 +01:00
parent 6f16ea6d49
commit bec49768d1

View file

@ -71,7 +71,7 @@ def query_package(module, brew_path, name, state="present"):
""" Returns whether a package is installed or not. """
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:
return True