Determine remote_url using git config
This commit is contained in:
		
							parent
							
								
									cb2cf654a4
								
							
						
					
					
						commit
						5f18f0bb03
					
				@ -325,7 +325,11 @@ module Homebrew
 | 
			
		||||
          odie "Unable to fork: #{e.message}!"
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        remote_url = response.fetch("clone_url")
 | 
			
		||||
        if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
 | 
			
		||||
          remote_url = response.fetch("ssh_url")
 | 
			
		||||
        else
 | 
			
		||||
          remote_url = response.fetch("clone_url")
 | 
			
		||||
        end
 | 
			
		||||
        username = response.fetch("owner").fetch("login")
 | 
			
		||||
 | 
			
		||||
        safe_system "git", "fetch", "--unshallow", "origin" if shallow
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user