utils: raise UsageError in parse_author!
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
59dae75709
commit
f812654cc1
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user