formula: sort outdated versions naturally.

Because the versions are read from directory listings, we get
alphabetical sorts of version numbers in `brew outdated` output:

   some-keg (10.1.10, 10.1.11, 10.1.9 < 10.1.12)

This is nicer:

   some-keg (10.1.9, 10.1.10, 10.1.11 < 10.1.12)

Closes Homebrew/homebrew#49534.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Usman Akeju 2016-02-25 21:34:00 +01:00 committed by Mike McQuaid
parent b52af53e71
commit bbe4191c61

View File

@ -974,7 +974,7 @@ class Formula
end
if older_or_same_tap_versions.all? { |v| pkg_version > v }
all_versions
all_versions.sort!
else
[]
end