fix(init-uninstall): uninstall removes --claude-md artifacts on Windows#392
fix(init-uninstall): uninstall removes --claude-md artifacts on Windows#392
Conversation
|
Summary
|
sync dev
Core fix (src/init.rs — uninstall()): - Added step 3b after existing @RTK.md removal: checks for <!-- rtk-instructions marker in CLAUDE.md and removes the block using the existing remove_rtk_block() helper - Handles both artifacts in a single pass (covers edge case where both @RTK.md and the instructions block exist, e.g. after running both rtk init -g and rtk init -g --claude-md) - If CLAUDE.md becomes empty after cleanup, deletes the file Hardening: - Extracted RTK_BLOCK_START and RTK_BLOCK_END constants — all marker matching across uninstall(), upsert_rtk_block(), remove_rtk_block(), patch_claude_md(), and show_config() now uses these instead of duplicated string literals - When uninstall finds nothing to remove, prints which paths were checked to help users diagnose path issues - resolve_claude_dir() error message now shows %USERPROFILE% on Windows instead of $HOME Signed-off-by: Adrien Eppling <adrien.eppling@supinfo.com>
1cac797 to
8fc0e4d
Compare
dc20fc4 to
cc93afc
Compare
|
Thanks @aeppling! Clean fix — reusing Two things to address: Must fix:
Nice to fix:
Also, could you enable "Allow edits by maintainers" on this PR? It would let us help with small fixes if needed. Thanks! |
Fix 1src/init.rs:1009: before.to_string() → format!("{}\n", before) — files now keep their trailing newline Fix 2src/init.rs:1677-1736: Both "integration" tests simplified to call remove_rtk_block() directly on Fix 3CHANGELOG.md: Moved the #384 entry from the second [Unreleased] section into the first (canonical) one, Skipped 4This test is already a pure in-memory test — it doesn't create a |
Signed-off-by: aesoft <43991222+aeppling@users.noreply.github.com>
7042ca9 to
69a9c64
Compare
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
Fix for : #384
Core fix (src/init.rs — uninstall()):
Hardening: