msanders / cider

Hassle-free bootstrapping with Homebrew.
https://pypi.python.org/pypi/cider/
MIT License
839 stars 25 forks source link

`cider restore` doesn't upgrade existing formulae #22

Closed mjm closed 9 years ago

mjm commented 9 years ago

If I run cider restore on a machine I've already restored, I get a bunch of warnings like "Warning: ack-2.14 already installed" which is a little annoying but doesn't impact behavior.

But if the current version of the formula is newer than what I have installed, I get an error:

Error: redis-2.8.17 already installed
To install this version, first `brew unlink redis'
Failed to install redis. Continue? [y/N] [y/N]: 

This seems to be because cider is calling brew install instead of brew upgrade, which does what I would expect.

mjm commented 9 years ago

I'm not sure this is the issue I was observing. In my experience, I had already run brew update myself before running cider restore, which is precisely why I saw this issue: because brew's latest version number exceeded my installed version. It's the fact that safe_install invokes the install command instead of upgrade when there is an existing version that causes this issue.

msanders commented 9 years ago

Ah, ok. Thanks for clarifying. I'll look into this in more detail (think we just need to use brew upgrade instead of install if a formula is listed in brew outdated).