diff options
| author | Mike McQuaid | 2016-09-11 10:39:58 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-11 10:39:58 +0100 |
| commit | ad3359b96e12bca58828eb1bccb18632e79f41ea (patch) | |
| tree | c09b3f719af868c8f6613baf15820b0a0715715e | |
| parent | 2815485f544ae9e4b2a04e32ee9cb01e7cea47c0 (diff) | |
| parent | be6876c79ab99c974d853d6d65f2a36660af8d1a (diff) | |
| download | brew-ad3359b96e12bca58828eb1bccb18632e79f41ea.tar.bz2 | |
Merge pull request #916 from MikeMcQuaid/bottle-old-value
bottle: fix old_value/value ordering for --merge.
| -rw-r--r-- | Library/Homebrew/dev-cmd/bottle.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 9fca091d4..326f937df 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -383,24 +383,24 @@ module Homebrew bottle_block_contents.lines.each do |line| line = line.strip next if line.empty? - key, value_original, _, tag = line.split " ", 4 + key, old_value_original, _, tag = line.split " ", 4 valid_key = %w[root_url prefix cellar rebuild sha1 sha256].include? key next unless valid_key - value = value_original.to_s.delete ":'\"" + old_value = old_value_original.to_s.delete ":'\"" tag = tag.to_s.delete ":" if !tag.empty? if !bottle_hash["bottle"]["tags"][tag].to_s.empty? mismatches << "#{key} => #{tag}" else - bottle.send(key, value => tag.to_sym) + bottle.send(key, old_value => tag.to_sym) end next end - old_value_original = bottle_hash["bottle"][key] - old_value = old_value_original.to_s + value_original = bottle_hash["bottle"][key] + value = value_original.to_s next if key == "cellar" && old_value == "any" && value == "any_skip_relocation" if old_value.empty? || value != old_value old_value = old_value_original.inspect |
