mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
homebrew_cask: check err instead of out for "nothing to list".
This commit is contained in:
parent
55f636675c
commit
911a3930a6
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ class HomebrewCask(object):
|
||||||
cmd = [self.brew_path, 'cask', 'list']
|
cmd = [self.brew_path, 'cask', 'list']
|
||||||
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 err:
|
||||||
return False
|
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()]
|
||||||
|
|
Loading…
Reference in a new issue