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
This commit is contained in:
joshp123 2026-05-06 16:09:52 +02:00
parent 794cf476d9
commit 73e9320cac

View File

@ -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