1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #5489 from daghoidahl/devel

Use "brew list <name>" instead of grepping the output of "brew list". Fix for #5488
This commit is contained in:
Michael DeHaan 2014-01-04 10:52:03 -08:00
commit e0cd4a45c6

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