From a5768de0c3789dd771b3f6d5b74ae4171cb26f03 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Tue, 22 Jun 2021 09:23:56 -0400 Subject: [PATCH] Sparkle: Account for empty pubDate --- Library/Homebrew/livecheck/strategy/sparkle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/livecheck/strategy/sparkle.rb b/Library/Homebrew/livecheck/strategy/sparkle.rb index 38c2809188..34cfe28934 100644 --- a/Library/Homebrew/livecheck/strategy/sparkle.rb +++ b/Library/Homebrew/livecheck/strategy/sparkle.rb @@ -75,7 +75,7 @@ module Homebrew version ||= (item > "version").first&.text&.strip title = (item > "title").first&.text&.strip - pub_date = (item > "pubDate").first&.text&.strip&.yield_self { |d| Time.parse(d) } + pub_date = (item > "pubDate").first&.text&.strip&.presence&.yield_self { |d| Time.parse(d) } if (match = title&.match(/(\d+(?:\.\d+)*)\s*(\([^)]+\))?\Z/)) short_version ||= match[1]