mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
bottle_resolve_version: return PkgVersion
This commit is contained in:
parent
2751449abb
commit
602ea66a0f
@ -58,7 +58,7 @@ def bottle_resolve_formula_names bottle_file
|
||||
end
|
||||
|
||||
def bottle_resolve_version bottle_file
|
||||
Version.new bottle_receipt_path(bottle_file).split("/")[1]
|
||||
PkgVersion.parse bottle_receipt_path(bottle_file).split("/")[1]
|
||||
end
|
||||
|
||||
class Bintray
|
||||
|
@ -83,7 +83,13 @@ module Homebrew
|
||||
next
|
||||
end
|
||||
|
||||
if f.version > version || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
|
||||
file_is_stale = if PkgVersion === version
|
||||
f.pkg_version > version
|
||||
else
|
||||
f.version > version
|
||||
end
|
||||
|
||||
if file_is_stale || ARGV.switch?('s') && !f.installed? || bottle_file_outdated?(f, file)
|
||||
cleanup_path(file) { file.unlink }
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user