Handle homebrew_cask "nothing to list" corner case.
This commit is contained in:
parent
fe5b96a432
commit
c9b8877cc6
1 changed files with 3 additions and 1 deletions
|
@ -327,7 +327,9 @@ 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 rc == 0:
|
if 'nothing to list' in out:
|
||||||
|
return True
|
||||||
|
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
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue