From 404b7140b61ba99591ff10cfa108ebf689fe4f5b Mon Sep 17 00:00:00 2001 From: Daniel Jaouen Date: Sat, 29 Sep 2018 20:30:47 -0400 Subject: [PATCH] homebrew_cask: Fixes #38772 --- lib/ansible/modules/packaging/os/homebrew_cask.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/packaging/os/homebrew_cask.py b/lib/ansible/modules/packaging/os/homebrew_cask.py index 9b885a5031..e835f4ea77 100644 --- a/lib/ansible/modules/packaging/os/homebrew_cask.py +++ b/lib/ansible/modules/packaging/os/homebrew_cask.py @@ -449,10 +449,10 @@ class HomebrewCask(object): ] rc, out, err = self.module.run_command(cmd) - if re.search(r'Error: Cask .* is not installed.', err): - return False - else: + if rc == 0: return True + else: + return False # /checks ------------------------------------------------------ }}} # commands ----------------------------------------------------- {{{