Use file:// protocol for cloning under test

This commit is contained in:
Anthony Sottile
2017-09-22 10:25:02 -07:00
parent e76bc17f53
commit 989bcfe9ca
4 changed files with 7 additions and 3 deletions

View File

@@ -37,8 +37,11 @@ def in_env(repo_cmd_runner):
def guess_go_dir(remote_url):
if remote_url.endswith('.git'):
remote_url = remote_url[:-1 * len('.git')]
looks_like_url = (
not remote_url.startswith('file://') and
('//' in remote_url or '@' in remote_url)
)
remote_url = remote_url.replace(':', '/')
looks_like_url = '//' in remote_url or '@' in remote_url
if looks_like_url:
_, _, remote_url = remote_url.rpartition('//')
_, _, remote_url = remote_url.rpartition('@')