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

reviewable/pr18780/r1
Daniel Jaouen 11 years ago
parent fb526e1afb
commit fe362b79fd

@ -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…
Cancel
Save