fixed bug when extracting repo name from url

This commit is contained in:
brb
2023-07-05 20:46:12 +02:00
parent 711e337ab9
commit 43aec88640
+1 -1
View File
@@ -3,7 +3,7 @@ from pathlib import Path
def clone_repository(repo_url: AnyHttpUrl) -> Path: def clone_repository(repo_url: AnyHttpUrl) -> Path:
print(f'cloning into {repo_url}') print(f'cloning into {repo_url}')
repo_name = repo_url.split('/')[-1].strip('\.git') repo_name = repo_url.split('/')[-1].replace('.git', '')
dst_dir = Path(__file__).parent / repo_name dst_dir = Path(__file__).parent / repo_name
dst_dir.mkdir(exist_ok=True) dst_dir.mkdir(exist_ok=True)
return dst_dir return dst_dir