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

homebrew_cask: return False instead of True when nothing to list.

This commit is contained in:
Daniel Jaouen 2014-02-19 18:57:36 -05:00
parent 8a612ba5d4
commit 55f636675c

View file

@ -328,7 +328,7 @@ class HomebrewCask(object):
rc, out, err = self.module.run_command(cmd) rc, out, err = self.module.run_command(cmd)
if 'nothing to list' in out: if 'nothing to list' in out:
return True return False
elif rc == 0: elif rc == 0:
casks = [cask_.strip() for cask_ in out.split('\n') if cask_.strip()] casks = [cask_.strip() for cask_ in out.split('\n') if cask_.strip()]
return self.current_cask in casks return self.current_cask in casks