mirror of
https://github.com/storytold/craft-anything.git
synced 2026-11-05 20:47:45 +01:00
8071522b3d
Pi rejects an empty `mcp.json`, so setup marks Pi as "empty is invalid". The check also ran when the file didn't exist yet: its absent text read as empty, the plan was blocked ("the file is empty, and this app requires valid JSON"), and `setup --all-detected --yes` stopped with it.
A missing file now starts from `{}` and is created with our `mcpServers` entry. An existing empty file is still refused. The preview of a new file shows only the added lines.
**Verified:** a new setup test where Pi's folder exists without `mcp.json`: the plan isn't blocked, apply writes a valid file with our entry, and an empty file is still blocked. `cargo test -p craft-anything-setup` (24), clippy, fmt.
Fixes #238