Skip to content

fix(init): respect CLAUDE_CONFIG_DIR for global paths#674

Open
TechWizard9999 wants to merge 1 commit intortk-ai:developfrom
TechWizard9999:fix/init-respect-claude-config-dir
Open

fix(init): respect CLAUDE_CONFIG_DIR for global paths#674
TechWizard9999 wants to merge 1 commit intortk-ai:developfrom
TechWizard9999:fix/init-respect-claude-config-dir

Conversation

@TechWizard9999
Copy link

Description

rtk init -g ignored CLAUDE_CONFIG_DIR and always targeted ~/.claude. This PR makes global Claude path resolution env-aware so installs/patches land in the intended config directory.

Related Issue

Closes #633

Changes Made

  • updated Claude config resolver to honor CLAUDE_CONFIG_DIR when set
  • added explicit validation for empty CLAUDE_CONFIG_DIR
  • updated manual patch instructions to print the resolved settings.json path instead of always showing ~/.claude/settings.json
  • added unit tests for env override, home fallback, and empty override rejection
  • added changelog entry under Unreleased bug fixes

Files Changed

Testing

  • cargo fmt --all --check
  • rtk cargo clippy --all-targets (2 pre-existing warnings in untouched files)
  • rtk cargo test
  • rtk cargo test init::tests::test_resolve_claude_dir_

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Documentation updated
  • No breaking changes introduced

cc @pszymkowiak for review

Signed-off-by: Roopesh <roopesh1724989@gmail.com>
@TechWizard9999 TechWizard9999 force-pushed the fix/init-respect-claude-config-dir branch from 157233e to 96e2620 Compare March 19, 2026 04:22
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.

1 participant