Files
msd-core/bin
TÂCHES 6cf4a4e3f6 fix: prevent installer from deleting opencode.json on parse errors (#475)
The installer was using JSON.parse() which fails on JSONC (JSON with
Comments) files. OpenCode supports JSONC via jsonc-parser, so users
may have comments or trailing commas in their config.

Previously, parse failures would reset config to {} and overwrite the
user's file, causing data loss.

Changes:
- Add parseJsonc() to handle comments, trailing commas, and BOM
- On parse failure, skip permission config entirely instead of
  overwriting user's file
- Show helpful error message with reason

Fixes #474

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 01:14:50 -06:00
..