utils: raise UsageError in parse_author!

Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
nandahkrishna 2021-04-01 22:21:30 +05:30 committed by BrewTestBot
parent 59dae75709
commit f812654cc1
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F

View File

@ -469,7 +469,7 @@ module Kernel
def parse_author!(author)
/^(?<name>[^<]+?)[ \t]*<(?<email>[^>]+?)>$/ =~ author
raise "Unable to parse name and email." if name.blank? && email.blank?
raise UsageError, "Unable to parse name and email." if name.blank? && email.blank?
{ name: name, email: email }
end