Skip to content

"rtk init --global" breaks symlink #653

Closed

Description

@hyacinthus

I share settings.json across multiple devices, but this command turned my symlink into a regular file.

I consider this a serious issue.

Another problem is that settings.json shouldn't contain absolute paths, and the patch content also includes absolute paths, making it impossible to share across multiple machines. I refactored them to relative paths.

As for why rtk.md is injected into CLAUDE.md, another issue already asked about it, so I won't ask here.

Activity

  1. TechWizard9999 commented on Mar 18, 2026

    @TechWizard9999
    Contributor

    I’m taking this issue. I’ll fix settings.json patching so symlinked settings files are preserved (no symlink replacement), with tests, in a focused PR against develop.

  2. TechWizard9999 commented on Mar 18, 2026

    @TechWizard9999
    Contributor

    I’ve submitted a PR to address this issue: #675

    Changes include:

    • preserving symlinked settings.json during patch writes (no symlink replacement)
    • writing a portable hook command path instead of machine-specific absolute paths
    • updating manual patch instructions to the same portable command format
    • adding regression tests for both behaviors

    Validation run:

    • cargo fmt --all --check
    • rtk cargo clippy --all-targets
    • rtk cargo test

    Please review when you get a chance.

  3. pszymkowiak commented on Mar 20, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟠 Priority high
    🎯 Confidence 92%

    Summary

    rtk init --global destroys settings.json symlinks by overwriting with a regular file; two PRs (#675, #2088) already in progress with fixes.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/init.rs

    Triaged automatically by wshm · This is an automated analysis, not a human review.

  4. added 2 commits that reference this issue on May 26, 2026
    cf7e5fd
    888d874
  5. assigned and unassigned on May 31, 2026
  6. added a commit that references this issue on May 31, 2026
    508192d
  7. added a commit that references this issue on Jul 25, 2026
    d94c333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions