aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-06-20 13:07:43 +0100
committerMike McQuaid2013-06-20 13:07:43 +0100
commita5e26485f05467ca06cc3abf5c5f55b6ba6685c4 (patch)
tree22a7a9d1f8f810f2f69f1026745c617ab0815c99 /Library
parente11f802839da56be2b164d37db2831011e84d3c4 (diff)
downloadhomebrew-a5e26485f05467ca06cc3abf5c5f55b6ba6685c4.tar.bz2
Formula: improve local bottle failure messaging.
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