mirror of
https://github.com/dtzp555-max/ocp.git
synced 2026-07-21 21:15:09 +00:00
setup.mjs previously wrote the launchd plist and the Linux systemd unit with writeFileSync(path, NEW_TEMPLATE_STRING), which silently dropped any user-customised env vars (CLAUDE_HEARTBEAT_INTERVAL, CLAUDE_CACHE_TTL, etc.) on every re-setup or upgrade. This change introduces scripts/lib/plist-merge.mjs which preserves keys present only in the existing file and lets the template's known keys win. Linux variant uses the same logic against Environment=KEY=VALUE lines. Tests added in test-features.mjs cover preserve / override / first-install for both formats. No cli.js citation needed: this is OCP-internal installer behaviour with no corresponding cli.js operation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>