aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-09-10 11:02:19 +0100
committerGitHub2016-09-10 11:02:19 +0100
commit5b90b451f761cad26121fec013cdb2e77f31c57d (patch)
tree239e8952a19da4cc594c002fb069212d8ef94b42 /Library
parent4fb691e1759eab70801d58801ed28762e4519897 (diff)
parent44ba4583b74f913658d246ed74de204c70757806 (diff)
downloadbrew-5b90b451f761cad26121fec013cdb2e77f31c57d.tar.bz2
Merge pull request #909 from MikeMcQuaid/bottle-keep-old-improve-output
bottle: improve --keep-old failure output.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index 1ae44b7e6..306296b46 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -295,7 +295,17 @@ module Homebrew
bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation
unless bad_fields.empty?
bottle_path.unlink if bottle_path.exist?
- odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}"
+
+ bad_changes = bad_fields.map do |field|
+ old_value = old_spec.send(field).inspect
+ bottle_value = bottle.send(field).inspect
+ "#{field}: old: #{old_value}, new: #{bottle_value}"
+ end
+
+ odie <<-EOS.undent
+ --keep-old was passed but there are changes in:
+ #{bad_changes.join("\n")}
+ EOS
end
end