Fix built_as_bottle in Formula's to_hash
This was caused by a "race" between two commits. bash-3.2$ git log -n1 --format=%ai 3344229 2012-08-15 22:08:40 -0500 bash-3.2$ git log -n1 --format=%ci 3344229 2012-09-17 20:01:37 -0500 bash-3.2$ git log -n1 --format=%ai 8837423 2012-08-25 11:31:57 -0700 bash-3.2$ git log -n1 --format=%ci 8837423 2012-08-25 11:52:37 -0700 "built_bottle" was renamed "built_as_bottle" in 8837423 after the date 3344229 was authored but before the date it was committed to master, and unfortunately in the interim 3344229 hadn't been updated to reflect the name change. This commit changes the Formula class's to_hash method to use tab.built_as_bottle not tab.built_bottle, which doesn't exist. At this time, there is no way that to_hash could have known that tab.built_bottle is bogus. Perhaps this could be made safer in the future, so that non-existent methods cause an error here rather than just silently returning null. Closes Homebrew/homebrew#47912 Closes Homebrew/homebrew#47916. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
256aea180a
commit
07e849e7f4
@ -1287,7 +1287,7 @@ class Formula
|
||||
hsh["installed"] << {
|
||||
"version" => keg.version.to_s,
|
||||
"used_options" => tab.used_options.as_flags,
|
||||
"built_as_bottle" => tab.built_bottle,
|
||||
"built_as_bottle" => tab.built_as_bottle,
|
||||
"poured_from_bottle" => tab.poured_from_bottle
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user