Commit 911a3930 by Daniel Jaouen

homebrew_cask: check err instead of out for "nothing to list".

parent 55f63667
...@@ -327,7 +327,7 @@ class HomebrewCask(object): ...@@ -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()]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment