ci/nur/combine.py: fix copytree calls to use correct symlinks argument

This commit is contained in:
Rhys-T 2024-09-16 13:48:34 -04:00 committed by GitHub
parent 7285fa9f22
commit 7ee4712a99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,7 +50,7 @@ def commit_repo(repo: Repo, message: str, path: Path) -> Repo:
assert tmp is not None
try:
shutil.copytree(repo_source(repo.name), tmp.name, preserve_symlinks=1)
shutil.copytree(repo_source(repo.name), tmp.name, symlinks=True)
shutil.rmtree(repo_path, ignore_errors=True)
os.rename(tmp.name, repo_path)
tmp = None
@ -159,7 +159,7 @@ def setup_combined() -> None:
write_json_file(dict(repos={}), manifest_path)
manifest_lib = "lib"
shutil.copytree(str(ROOT.joinpath("lib")), manifest_lib, preserve_symlinks=1)
shutil.copytree(str(ROOT.joinpath("lib")), manifest_lib, symlinks=True)
default_nix = "default.nix"
shutil.copy(ROOT.joinpath("default.nix"), default_nix)