From d8f9552cabffc4033aa24b84870a16d49d6b6a6d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 26 May 2015 15:49:39 +0100 Subject: bottle: handle nil bottle revision case. --- Library/Homebrew/cmd/bottle.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 8d5229653..a06545d42 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -131,8 +131,8 @@ module Homebrew ohai "Determining #{f.name} bottle revision..." versions = FormulaVersions.new(f) bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version] - bottle_revisions.pop if bottle_revisions.last > 0 - bottle_revision = bottle_revisions.any? ? bottle_revisions.max + 1 : 0 + bottle_revisions.pop if bottle_revisions.last.to_i > 0 + bottle_revision = bottle_revisions.any? ? bottle_revisions.max.to_i + 1 : 0 end filename = Bottle::Filename.create(f, bottle_tag, bottle_revision) -- cgit v1.2.3