Skip to content

fix: honor explicit XDG directory overrides - #14

Open
luochen211 wants to merge 1 commit into
mercallureAI:mainfrom
luochen211:fix/xdg-directory-overrides
Open

luochen211 wants to merge 1 commit into
mercallureAI:mainfrom
luochen211:fix/xdg-directory-overrides

Conversation

@luochen211

@luochen211 luochen211 commented Sep 3, 2026

Copy link
Copy Markdown

Problem

TeamDNA's path helpers only honor XDG_CONFIG_HOME and XDG_DATA_HOME on Linux. When either variable is explicitly set on macOS or Windows, the helpers ignore it and continue using ~/.teamdna.

This also breaks the MCP end-to-end test isolation on macOS: the tests provide temporary XDG directories, but the server reads the user's real home-directory configuration instead. On macOS this caused 5 of the 18 MCP tests to fail.

Change

  • Honor an explicitly configured XDG directory before applying platform defaults.
  • Preserve the existing defaults when no XDG override is present: ~/.config/teamdna and ~/.local/share/teamdna on Linux, and ~/.teamdna on macOS and Windows.
  • Clarify the override behavior in the path helper documentation.

Validation

  • npm ci
  • npm test — 18 tests passed

Closes #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.

Explicit XDG directory overrides are ignored outside Linux

1 participant