Explorar o código

fix(git): handle port (#1912)

This fixes #1911
Richard Gomez hai 8 meses
pai
achega
7b02c98eb4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      sources/git.go

+ 1 - 1
sources/git.go

@@ -440,7 +440,7 @@ End:
 	}
 }
 
-var sshUrlpat = regexp.MustCompile(`^git@([a-zA-Z0-9.-]+):([\w/.-]+?)(?:\.git)?$`)
+var sshUrlpat = regexp.MustCompile(`^git@([a-zA-Z0-9.-]+):(?:\d{1,5}/)?([\w/.-]+?)(?:\.git)?$`)
 
 func getRemoteUrl(source string) (*url.URL, error) {
 	// This will return the first remote — typically, "origin".