Selaa lähdekoodia

fix(git): handle port (#1912)

This fixes #1911
Richard Gomez 7 kuukautta sitten
vanhempi
commit
7b02c98eb4
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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) {
 func getRemoteUrl(source string) (*url.URL, error) {
 	// This will return the first remote — typically, "origin".
 	// This will return the first remote — typically, "origin".