Adopt read-only managed workspace files
Allow the workspace materializer to replace read-only existing targets when the state manifest is missing, while still refusing writable user-owned files. This keeps Nix-owned OpenClaw docs deployable across module upgrades. Tests: manual materializer smoke for read-only adopt and writable refusal; nix build --accept-flake-config .#checks.aarch64-darwin.ci --no-link
This commit is contained in:
parent
ab4bbf5dba
commit
2d0a67d190
@ -27,7 +27,7 @@ copy_path() {
|
||||
source="$1"
|
||||
target="$2"
|
||||
|
||||
if [ -e "$target" ] && [ ! -L "$target" ] && ! was_managed "$target"; then
|
||||
if [ -e "$target" ] && [ ! -L "$target" ] && ! was_managed "$target" && [ -w "$target" ]; then
|
||||
echo "OpenClaw workspace path exists and is not managed by Nix: $target" >&2
|
||||
echo "Move it into programs.openclaw.documents or remove it before switching." >&2
|
||||
exit 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user