templates/copy: fix use shutil to copy hidden dot files
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from clan_lib.flake import Flake
|
from clan_lib.flake import Flake
|
||||||
@@ -35,7 +36,7 @@ def copy_from_nixstore(src: Path, dest: Path) -> None:
|
|||||||
Uses `cp -r` to recursively copy the directory.
|
Uses `cp -r` to recursively copy the directory.
|
||||||
Ensures the destination directory is writable by the user.
|
Ensures the destination directory is writable by the user.
|
||||||
"""
|
"""
|
||||||
run(["cp", "-r", str(src / "."), str(dest)]) # Copy contents of src to dest
|
shutil.copytree(src, dest, dirs_exist_ok=True, symlinks=True)
|
||||||
run(
|
run(
|
||||||
["chmod", "-R", "u+w", str(dest)]
|
["chmod", "-R", "u+w", str(dest)]
|
||||||
) # Ensure the destination is writable by the user
|
) # Ensure the destination is writable by the user
|
||||||
|
|||||||
Reference in New Issue
Block a user