From 59bd0a054760e46e67c9e68e192649cfd71ddc44 Mon Sep 17 00:00:00 2001 From: 0xrsydn Date: Sun, 22 Mar 2026 02:00:02 +0700 Subject: [PATCH] fix: chmod DESCRIPTION.md before overwrite in Nix sandbox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit copytree makes files read-only in Nix sandbox; rglob("DESCRIPTION.md") then tries to overwrite skill-level copies → PermissionError. chmod 0o644 before copy2 to handle already-existing read-only targets. Co-Authored-By: Claude Opus 4.6 (1M context) --- module.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module.nix b/module.nix index a309545..cb327f8 100644 --- a/module.nix +++ b/module.nix @@ -127,6 +127,8 @@ let continue target = out / rel target.parent.mkdir(parents=True, exist_ok=True) + if target.exists(): + target.chmod(0o644) shutil.copy2(desc, target) for rel_str in optional_skills: @@ -148,6 +150,8 @@ let if desc_src.exists(): desc_dst = out / rel.parts[0] / "DESCRIPTION.md" desc_dst.parent.mkdir(parents=True, exist_ok=True) + if desc_dst.exists(): + desc_dst.chmod(0o644) shutil.copy2(desc_src, desc_dst) for spec in custom_skills: