Skip to content

fix: respect XDG_DATA_HOME for auth sync paths#233

Open
exiast wants to merge 1 commit into
griffinmartin:mainfrom
exiast:fix/xdg-data-home-auth-path
Open

fix: respect XDG_DATA_HOME for auth sync paths#233
exiast wants to merge 1 commit into
griffinmartin:mainfrom
exiast:fix/xdg-data-home-auth-path

Conversation

@exiast

@exiast exiast commented May 28, 2026

Copy link
Copy Markdown

Summary

  • use XDG_DATA_HOME (when set) for OpenCode data dir on non-Windows
  • keep existing fallback to ~/.local/share/opencode
  • apply this to both auth.json sync path and claude-account-source.txt

Why

OpenCode can run with custom XDG paths. The plugin currently hardcodes ~/.local/share/opencode, so Anthropic creds are synced to a different location than the one OpenCode reads.

Verification

  • built with npm run build
  • verified behavior against custom XDG_DATA_HOME environment locally

Fixes #232.

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.

Respect XDG_DATA_HOME when syncing auth.json

1 participant