Skip to content

fix: fall back to legacy config after empty XDG home#185

Merged
steipete merged 1 commit into
mainfrom
fix/xdg-config-fallback
May 21, 2026
Merged

fix: fall back to legacy config after empty XDG home#185
steipete merged 1 commit into
mainfrom
fix/xdg-config-fallback

Conversation

@steipete
Copy link
Copy Markdown
Collaborator

Summary

  • fall back from an empty $XDG_CONFIG_HOME/mcporter/mcporter.json[c] to legacy ~/.mcporter/mcporter.json[c]
  • keep XDG priority when an XDG mcporter config exists
  • preserve config import --copy project-default write behavior unless --config / MCPORTER_CONFIG is explicit
  • update config docs and changelog

Fixes #184.

Verification

  • ./runner pnpm exec vitest run tests/paths.test.ts tests/config-resolution.test.ts tests/config-layered.test.ts
  • ./runner pnpm exec vitest run tests/config-import.test.ts tests/paths.test.ts tests/config-resolution.test.ts tests/config-layered.test.ts
  • ./runner pnpm check
  • ./runner pnpm test
  • live smoke: fake HOME with ~/.mcporter/mcporter.json, empty XDG_CONFIG_HOME, mcporter list --json discovers the legacy legacySmoke server
  • Codex Auto Review: /Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review --mode local --parallel-tests "./runner pnpm exec vitest run tests/config-import.test.ts tests/paths.test.ts tests/config-resolution.test.ts tests/config-layered.test.ts" clean

@steipete steipete merged commit 67e3f52 into main May 21, 2026
5 checks passed
@steipete steipete deleted the fix/xdg-config-fallback branch May 21, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.10.x: honoring caller's XDG_CONFIG_HOME silently empties server registry when embedder uses XDG for a different downstream tool

1 participant