Merge pull request #14603 from reitermarkus/unversioned-casks

Fix duration calculation in `bump-unversioned-casks`.
This commit is contained in:
Kevin 2023-02-11 22:28:02 -08:00 committed by GitHub
commit e940f77444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ module Homebrew
last_check_time = state["check_time"]&.then { |t| Time.parse(t) }
check_time = Time.now
if last_check_time && check_time < (last_check_time + (DateTime.now + 1).to_time)
if last_check_time && (check_time - last_check_time) / 3600 < 24
opoo "Skipping, already checked within the last 24 hours."
return
end