Skip to content

Commit 43045a0

Browse files
update extract
1 parent da38c6d commit 43045a0

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

github_scripts/get_git_sources.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None:
109109
Rsync a local git clone and checkout the provided ref
110110
"""
111111

112+
# Remove if this clone already exists
113+
if loc.exists():
114+
rmtree(loc)
115+
116+
# Create a clean clone location
117+
loc.mkdir(parents=True)
118+
112119
# Trailing slash required for rsync
113120
command = f"rsync -av {repo_source}/ {loc}"
114121
run_command(command)

0 commit comments

Comments
 (0)