aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2015-09-11 11:16:15 +0100
committerMike McQuaid2015-09-11 11:16:15 +0100
commit6d6daae0506d35193d7032eaf87982bdb5b421f8 (patch)
tree2ff4910676a17cf7518c0d62da1ba7b485ba081e /Library/Homebrew
parentb1ff9c42d67598d6d09a71ee4ef333847dd09e1b (diff)
downloadbrew-6d6daae0506d35193d7032eaf87982bdb5b421f8.tar.bz2
bottle: improve --keep-old error message.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/bottle.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index e5bbdb44b..4400d8470 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -205,12 +205,12 @@ module Homebrew
old_spec = f.bottle_specification
if ARGV.include?("--keep-old") && !old_spec.checksums.empty?
- bad = [:root_url, :prefix, :cellar, :revision].any? do |field|
+ bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field|
old_spec.send(field) != bottle.send(field)
end
- if bad
+ if bad_fields.any?
bottle_path.unlink if bottle_path.exist?
- odie "--keep-old is passed but at least one of fields are not the same"
+ odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
end
end