Commit e75964e2 by Michael DeHaan

Merge pull request #7969 from dedalusj/devel

Fixed bug with environment path for homebrew_cask
parents 58a23bc6 0a5cac56
...@@ -325,7 +325,7 @@ class HomebrewCask(object): ...@@ -325,7 +325,7 @@ class HomebrewCask(object):
raise HomebrewCaskException(self.message) raise HomebrewCaskException(self.message)
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, path_prefix=self.path[0])
if 'nothing to list' in err: if 'nothing to list' in err:
return False return False
...@@ -353,7 +353,7 @@ class HomebrewCask(object): ...@@ -353,7 +353,7 @@ class HomebrewCask(object):
rc, out, err = self.module.run_command([ rc, out, err = self.module.run_command([
self.brew_path, self.brew_path,
'update', 'update',
]) ], path_prefix=self.path[0])
if rc == 0: if rc == 0:
if out and isinstance(out, basestring): if out and isinstance(out, basestring):
already_updated = any( already_updated = any(
...@@ -399,7 +399,7 @@ class HomebrewCask(object): ...@@ -399,7 +399,7 @@ class HomebrewCask(object):
for opt in (self.brew_path, 'cask', 'install', self.current_cask) for opt in (self.brew_path, 'cask', 'install', self.current_cask)
if opt] if opt]
rc, out, err = self.module.run_command(cmd) rc, out, err = self.module.run_command(cmd, path_prefix=self.path[0])
if self._current_cask_is_installed(): if self._current_cask_is_installed():
self.changed_count += 1 self.changed_count += 1
...@@ -444,7 +444,7 @@ class HomebrewCask(object): ...@@ -444,7 +444,7 @@ class HomebrewCask(object):
for opt in (self.brew_path, 'cask', 'uninstall', self.current_cask) for opt in (self.brew_path, 'cask', 'uninstall', self.current_cask)
if opt] if opt]
rc, out, err = self.module.run_command(cmd) rc, out, err = self.module.run_command(cmd, path_prefix=self.path[0])
if not self._current_cask_is_installed(): if not self._current_cask_is_installed():
self.changed_count += 1 self.changed_count += 1
......
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