Skip to content

fix(cli): preserve symlinked config files - #45071

Open
opencode-agent[bot] wants to merge 5 commits into
v2from
cli-config-symlinks
Open

fix(cli): preserve symlinked config files#45071
opencode-agent[bot] wants to merge 5 commits into
v2from
cli-config-symlinks

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • preserve symlinked CLI configuration files during preference updates and legacy migrations by atomically replacing the resolved target instead of the link
  • share symlink-aware persistence across both write paths, clean up temporary files, and leave broken symlinks untouched
  • cover relative and absolute symlinks, JSONC preservation, migration, updates, and broken-link failures

Closes #45067

Verification

  • bun test test/config.test.ts --timeout 30000 (19 passing)
  • bun typecheck
  • bun x prettier --check src/config/config.ts src/config/migrate.ts src/config/persist.ts test/config.test.ts

Requested by: @neriousy (Filip via Slack)

@neriousy
neriousy enabled auto-merge (squash) August 25, 2026 20:56
@neriousy
neriousy disabled auto-merge August 25, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant