bottle: handle nil bottle revision case.
This commit is contained in:
parent
c327fdafa9
commit
d8f9552cab
@ -131,8 +131,8 @@ module Homebrew
|
|||||||
ohai "Determining #{f.name} bottle revision..."
|
ohai "Determining #{f.name} bottle revision..."
|
||||||
versions = FormulaVersions.new(f)
|
versions = FormulaVersions.new(f)
|
||||||
bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version]
|
bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version]
|
||||||
bottle_revisions.pop if bottle_revisions.last > 0
|
bottle_revisions.pop if bottle_revisions.last.to_i > 0
|
||||||
bottle_revision = bottle_revisions.any? ? bottle_revisions.max + 1 : 0
|
bottle_revision = bottle_revisions.any? ? bottle_revisions.max.to_i + 1 : 0
|
||||||
end
|
end
|
||||||
|
|
||||||
filename = Bottle::Filename.create(f, bottle_tag, bottle_revision)
|
filename = Bottle::Filename.create(f, bottle_tag, bottle_revision)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user