aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index a26e7e448..6026f5b6e 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -406,7 +406,15 @@ class Formula
elsif name.match bottle_regex
bottle_filename = Pathname(name).realpath
version = Version.parse(bottle_filename).to_s
- name = bottle_filename.basename.to_s.rpartition("-#{version}").first
+ bottle_basename = bottle_filename.basename.to_s
+ name_without_version = bottle_basename.rpartition("-#{version}").first
+ if name_without_version.empty?
+ if ARGV.homebrew_developer?
+ opoo "Add a new version regex to version.rb to parse this filename."
+ end
+ else
+ name = name_without_version
+ end
path = Formula.path(name)
install_type = :from_local_bottle
else