From 73e9320cac96a3e53e0f29e55a736eb9c773739a Mon Sep 17 00:00:00 2001 From: joshp123 Date: Wed, 6 May 2026 16:09:52 +0200 Subject: [PATCH] Replace read-only workspace directories Chmod existing materialized OpenClaw workspace targets before removal so Nix can update copied skill directories from previous generations. Tests: manual materializer smoke replacing read-only directory; nix build --accept-flake-config .#checks.aarch64-darwin.ci --no-link --- .../home-manager/openclaw-materialize-workspace-files.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/modules/home-manager/openclaw-materialize-workspace-files.sh b/nix/modules/home-manager/openclaw-materialize-workspace-files.sh index 47fd6fb..6a0ee06 100755 --- a/nix/modules/home-manager/openclaw-materialize-workspace-files.sh +++ b/nix/modules/home-manager/openclaw-materialize-workspace-files.sh @@ -18,7 +18,10 @@ copy_path() { source="$1" target="$2" - rm -rf "$target" + if [ -e "$target" ] || [ -L "$target" ]; then + chmod -R u+w "$target" 2>/dev/null || true + rm -rf "$target" + fi mkdir -p "$(dirname "$target")" if [ -d "$source" ]; then