utils: raise UsageError in parse_author!
				
					
				
			Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
		
							parent
							
								
									53a7065bcc
								
							
						
					
					
						commit
						3ce8ef3173
					
				@ -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