From 1bc460403bc690460eac6da739e50321642d5754 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 30 Jan 2013 21:47:08 -0800 Subject: [PATCH] Make local bottle installation more robust. Use versions to better get hold of the filename. --- Library/Homebrew/formula.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 1df4d42847..1c551aa254 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