aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-01-30 21:47:08 -0800
committerMike McQuaid2013-01-30 21:51:21 -0800
commitff8f8ff0d9af0835b6fffa135bc4aeadd414008f (patch)
treef1d16712249d7ad7a5d2de3de13ba5d6461453fc /Library
parentfb2d0caa94003d91b85b5927998d4b5bbb1211f8 (diff)
downloadhomebrew-ff8f8ff0d9af0835b6fffa135bc4aeadd414008f.tar.bz2
Make local bottle installation more robust.
Use versions to better get hold of the filename.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 1df4d4284..1c551aa25 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -394,7 +394,8 @@ class Formula
install_type = :from_url
elsif name.match bottle_regex
bottle_filename = Pathname(name).realpath
- name = bottle_filename.basename.to_s.rpartition('-').first
+ version = Version.parse(bottle_filename).to_s
+ name = bottle_filename.basename.to_s.rpartition("-#{version}").first
path = Formula.path(name)
install_type = :from_local_bottle
else