diff options
| author | Mike McQuaid | 2015-05-26 15:49:39 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-05-26 15:49:39 +0100 |
| commit | d8f9552cabffc4033aa24b84870a16d49d6b6a6d (patch) | |
| tree | 5a7ce788c92ba4150642f25204765a6c0c3a5de1 /Library/Homebrew/cmd/bottle.rb | |
| parent | c327fdafa9d20434fd3000f5968fb405794c590d (diff) | |
| download | brew-d8f9552cabffc4033aa24b84870a16d49d6b6a6d.tar.bz2 | |
bottle: handle nil bottle revision case.
Diffstat (limited to 'Library/Homebrew/cmd/bottle.rb')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
