Repository navigation
fix(init): create Claude config dir for global init - #2518
Closed
elite133713 wants to merge 1 commit into
Closed
elite133713 wants to merge 1 commit into
elite133713 wants to merge 1 commit into
Conversation
elite133713
force-pushed
the
fix/init-create-claude-config-dir
branch
from
June 19, 2026 23:37
5282cad to
408f132
Compare
Contributor
Author
|
Closing and recreating this PR so the commits use my GitHub no-reply author identity instead |
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.
Summary
Fixes #2519.
Context
Plain global init can currently fail on a fresh machine or user profile when ~/.claude does not exist:
The underlying issue is that atomic_write() creates its tempfile inside the target file's parent directory. That parent directory must exist before NamedTempFile::new_in(parent) is called.
Related: #1840 fixes the separate Cursor-only path for
rtk init -g --agent cursorand missing ~/.cursor. This PR intentionally stays focused on the default/global Claude init path.CONTRIBUTING.md alignment
fix(init): create Claude config dir for global init.develop.Test plan
cargo fmt --all --checkcargo test missing_claude_dir -- --nocapturecargo test --all(2212 passed, 8 ignored)cargo clippy --all-targets -- -D warningsHOMEandCLAUDE_CONFIG_DIR:./target/debug/rtk init -g --auto-patch