Skip to content

fix(config): use XDG directory on new Linux installs - #321

Closed
y4ho0 wants to merge 1 commit into
iOfficeAI:mainfrom
y4ho0:agent/fix-xdg-config-dir
Closed

fix(config): use XDG directory on new Linux installs#321
y4ho0 wants to merge 1 commit into
iOfficeAI:mainfrom
y4ho0:agent/fix-xdg-config-dir

Conversation

@y4ho0

@y4ho0 y4ho0 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Store config.json under $XDG_CONFIG_HOME/officecli on fresh Linux installs, falling back to ~/.config/officecli when the variable is unset or invalid.
  • Preserve ~/.officecli/config.json for existing Linux installs and all non-Linux platforms.
  • Keep an existing XDG config selected if logs, plugins, or caches later create ~/.officecli.
  • Leave logs, plugins, caches, and the container /tmp fallback unchanged.
  • Document the platform-specific config locations.

Closes #300

Validation

  • dotnet run --project tests/OfficeCli.ConfigPath.Tests/OfficeCli.ConfigPath.Tests.csproj
  • dotnet build src/officecli/officecli.csproj -c Release --nologo — 0 errors; one pre-existing CS8602 warning in ExcelHandler.SheetShift.cs:538
  • Isolated macOS smoke test confirming config remains under ~/.officecli/config.json

@y4ho0
y4ho0 marked this pull request as ready for review August 16, 2026 19:45
@goworm

goworm commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Thanks for the careful implementation — the resolver and the tests are clean. We've decided not to move to XDG though (see #300): adoption is thinner than it looks, with Docker, npm, Cargo, rustup and ssh all still using their own home directory. And scoping it to config.json alone would split the config across two places, since plugins, caches and logs stay in ~/.officecli — either everything moves or nothing does. Closing.

@goworm goworm closed this Aug 30, 2026
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.

Use XDG config directory

2 participants