Files
skillshare/internal
Willie 6b4a8782bd fix(cli): ensure --json mode outputs pure JSON to stdout
Address code review feedback from PR #67:

- Move all dry-run diagnostic messages (internal/sync) from stdout to
  stderr so they don't pollute JSON output
- Suppress UI output (spinners, headers, warnings) in uninstall --json
  mode by adding jsonOutput guards across all phases
- Return nil after writeJSONError to prevent dual output (JSON + plain
  text error) in install and sync commands
- Handle json.MarshalIndent error in writeJSONError with stderr fallback
- Merge duplicated discovery logic (JSON vs non-JSON branches) in sync,
  sync_project, diff, and collect using nullable spinner pattern
- Remove checkRepoDirty alias in status.go, call isRepoDirty directly
- Remove extractJSON test workaround — tests now assert stdout is valid
  JSON directly, enforcing the clean-stdout contract
2026-03-06 02:15:36 +08:00
..