Fix message when disablement is in the past.

This commit is contained in:
Markus Reiter 2024-08-14 21:31:01 +02:00
parent 3f1e90a3a5
commit 3342d5f99b
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -67,7 +67,13 @@ module DeprecateDisable
if !disable_date && formula_or_cask.deprecation_date if !disable_date && formula_or_cask.deprecation_date
disable_date = formula_or_cask.deprecation_date >> REMOVE_DISABLED_TIME_WINDOW disable_date = formula_or_cask.deprecation_date >> REMOVE_DISABLED_TIME_WINDOW
end end
message = "#{message} It will be disabled on #{disable_date}." if disable_date if disable_date
message += if disable_date < Date.today
" It was disabled on #{disable_date}."
else
" It will be disabled on #{disable_date}."
end
end
message message
end end