Update comment

This commit is contained in:
Connor Mann 2021-05-28 11:34:36 -04:00
parent 0da4c4e3ce
commit ab822ced36
No known key found for this signature in database
GPG Key ID: 2DD174E1FA330835

View File

@ -2182,8 +2182,8 @@ class Formula
eligible_for_cleanup = []
if latest_version_installed?
eligible_kegs = if head?
# Remove latest head and stable kegs
head, stable = installed_kegs.partition { |k| k.version.head? }
# Remove newest head and stable kegs
head.sort_by(&:version).slice(0...-1) + stable.sort_by(&:version).slice(0...-1)
else
installed_kegs.select do |keg|