Remove trailing version from short_version.
This commit is contained in:
parent
7c6116af99
commit
7b9556db06
@ -67,6 +67,8 @@ module Homebrew
|
||||
|
||||
sig { returns(T::Array[String]) }
|
||||
def nice_parts
|
||||
short_version = self.short_version&.delete_suffix("(#{version})") if version
|
||||
|
||||
return [short_version] if short_version == version
|
||||
|
||||
if short_version && version
|
||||
|
||||
@ -17,6 +17,7 @@ describe Homebrew::BundleVersion do
|
||||
["1.2.3.4000", "4000"] => "1.2.3.4000",
|
||||
["5", "5.0.45"] => "5.0.45",
|
||||
["XQuartz-2.7.11", "2.7.112"] => "2.7.11",
|
||||
["2.5.2(3329)", "3329"] => "2.5.2,3329",
|
||||
}
|
||||
|
||||
expected_mappings.each do |(short_version, version), expected_version|
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user