Skip to content
Snippets Groups Projects
Commit 5cb392d9 authored by Jack Nagel's avatar Jack Nagel
Browse files

Revert "Check empty? to avoid introducing nils"

This reverts commit 580cd173cbf92aa9851e68d635af518a668a6cdc.
parent 0abe1667
No related branches found
No related tags found
No related merge requests found
......@@ -125,17 +125,14 @@ module Homebrew
return ofail "Formula has no stable version: #{f.name}"
end
bottle_revision = 0
unless ARGV.include? "--no-revision"
if ARGV.include? '--no-revision'
bottle_revision = 0
else
ohai "Determining #{f.name} bottle revision..."
versions = FormulaVersions.new(f)
bottle_revisions = versions.bottle_version_map("origin/master")[f.pkg_version]
unless bottle_revisions.empty?
bottle_revisions.pop if bottle_revisions.last > 0
bottle_revision = bottle_revisions.max + 1
end
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment