Skip to content

Commit

Permalink
brew: Fixed bug with install()
Browse files Browse the repository at this point in the history
  • Loading branch information
sdh11 committed Jun 21, 2016
1 parent b7f428f commit 432ec7f
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pybombs/packagers/brew.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def get_available_version(self, pkgname):
try:
self.log.obnoxious("Checking homebrew for `{0}'".format(pkgname))
out = subprocess.check_output(["brew", "info", "--json=v1", pkgname])

# Returns non-zero exit status if package does not exist in brew taps
if len(out) >= 0:
# Get the version.
Expand Down Expand Up @@ -95,15 +94,13 @@ def install(self, pkgname):
"""
Call 'brew install pkgname' if we can satisfy the version requirements.
"""
available_version = self.get_version_from_apt_cache(pkg_name)
if required_version is not None and not vcompare(comparator, available_version, required_version):
return False
try:
# Need to do some better checking here. Brew does not necessarily need sudo
#sysutils.monitor_process(["sudo", "brew", "", "install", pkg_name])
sysutils.monitor_process(["brew", "install", pkg_name])
subproc.monitor_process(["brew", "install", pkgname])
return True
except:
except Exception as e:
#self.log.obnoxious(e)
self.log.error("Running brew install failed.")
return False

Expand Down

0 comments on commit 432ec7f

Please sign in to comment.