create: punt on bad URLs
When we can't detect a name from the URL, just ask the user. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
		
							parent
							
								
									a86f524156
								
							
						
					
					
						commit
						66388b7a43
					
				@ -20,7 +20,7 @@ module Homebrew extend self
 | 
			
		||||
          :autotools
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        if fc.name.to_s.strip.empty?
 | 
			
		||||
        if fc.name.nil? or fc.name.to_s.strip.empty?
 | 
			
		||||
          path = Pathname.new url
 | 
			
		||||
          print "Formula name [#{path.stem}]: "
 | 
			
		||||
          fc.name = __gets || path.stem
 | 
			
		||||
@ -67,7 +67,7 @@ class FormulaCreator
 | 
			
		||||
    path = Pathname.new url
 | 
			
		||||
    /(.*?)[-_.]?#{path.version}/.match path.basename
 | 
			
		||||
    @name = $1
 | 
			
		||||
    @path = Formula.path $1
 | 
			
		||||
    @path = Formula.path $1 unless $1.nil?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def version
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user