Skip to content

Commit

Permalink
ci/nur/combine.py: Try to fix File exists: 'lib' error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys-T committed Sep 17, 2024
1 parent 023b6b2 commit cd52c94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/nur/combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def commit_repo(repo: Repo, message: str, path: Path) -> Repo:
assert tmp is not None

try:
shutil.copytree(repo_source(repo.name), tmp.name, symlinks=True)
shutil.copytree(
repo_source(repo.name), tmp.name, symlinks=True, dirs_exist_ok=True
)
shutil.rmtree(repo_path, ignore_errors=True)
os.rename(tmp.name, repo_path)
tmp = None
Expand Down Expand Up @@ -159,7 +161,9 @@ def setup_combined() -> None:
write_json_file(dict(repos={}), manifest_path)

manifest_lib = "lib"
shutil.copytree(str(ROOT.joinpath("lib")), manifest_lib, symlinks=True)
shutil.copytree(
str(ROOT.joinpath("lib")), manifest_lib, symlinks=True, dirs_exist_ok=True
)
default_nix = "default.nix"
shutil.copy(ROOT.joinpath("default.nix"), default_nix)

Expand Down

0 comments on commit cd52c94

Please sign in to comment.