fix(cli): honor CLAUDE_CONFIG_DIR for global Claude settings path#1
Closed
punk-dev-robot wants to merge 1 commit into
Closed
fix(cli): honor CLAUDE_CONFIG_DIR for global Claude settings path#1punk-dev-robot wants to merge 1 commit into
punk-dev-robot wants to merge 1 commit into
Conversation
ClaudeHarness::settings_path hardcoded ~/.claude for global init, ignoring Claude Code's CLAUDE_CONFIG_DIR config-relocation env var. Now resolve CLAUDE_CONFIG_DIR first, falling back to ~/.claude when unset or empty. Project-level path is unchanged. Adds a unit test covering the override, the fallback, and that the non-global path is unaffected.
Owner
Author
|
Wrong target — recreated against upstream eqtylab/cupcake as eqtylab#112. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cupcake init --global --harness claudealways wrote hooks to~/.claude/settings.json, ignoring Claude Code'sCLAUDE_CONFIG_DIRenvironment variable. Users who relocate their Claude config viaCLAUDE_CONFIG_DIRgot the integration installed in the wrong place.Fix
ClaudeHarness::settings_path(global branch) now resolvesCLAUDE_CONFIG_DIRfirst and falls back to~/.claudewhen the var is unset or empty. The project-level (.claude/settings.json) path is unchanged.Scope
Repo-wide search confirmed
settings_pathis the only production code that constructed~/.claude;CLAUDE_CONFIG_DIRwas referenced nowhere before this change.Tests
Added
test_claude_global_settings_path_respects_config_dircovering the override, the unset fallback, and that the non-global path is unaffected.cargo test -p cupcake-cli harness_config→ 4 passed.