mirror of https://github.com/garrytan/gstack.git
fix(docs): correct per-skill symlink removal snippet in README uninstall
Closes #1130. The manual-uninstall fallback in `## Uninstall` → `### Option 2` used `find ~/.claude/skills -maxdepth 1 -type l`, which finds nothing on real installs. Each `~/.claude/skills/<name>/` is a real directory, and only `<name>/SKILL.md` inside it is a symlink into `gstack/`. The find never matched, so the snippet silently removed nothing. Replace with a directory walk that inspects each `<name>/SKILL.md`: find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack → check $dir/SKILL.md is a symlink → readlink it → if target is gstack/* or */gstack/*: rm -f the link, rmdir the dir (only if empty — preserves any user-added files) Excludes the top-level `gstack/` dir from the walk; that's removed by step 3 of the same uninstall block. `bin/gstack-uninstall` (the script-mode path) already handles the layout correctly via its own walk; only this manual fallback needed updating. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
19e699ab9b
commit
530987efb8
15
README.md
15
README.md
|
|
@ -327,9 +327,18 @@ If you don't have the repo cloned (e.g. you installed via a Claude Code paste an
|
|||
# 1. Stop browse daemons
|
||||
pkill -f "gstack.*browse" 2>/dev/null || true
|
||||
|
||||
# 2. Remove per-skill symlinks pointing into gstack/
|
||||
find ~/.claude/skills -maxdepth 1 -type l 2>/dev/null | while read -r link; do
|
||||
case "$(readlink "$link" 2>/dev/null)" in gstack/*|*/gstack/*) rm -f "$link" ;; esac
|
||||
# 2. Remove per-skill directories whose SKILL.md points into gstack/
|
||||
find ~/.claude/skills -mindepth 1 -maxdepth 1 -type d ! -name gstack 2>/dev/null |
|
||||
while IFS= read -r dir; do
|
||||
link="$dir/SKILL.md"
|
||||
[ -L "$link" ] || continue
|
||||
target=$(readlink "$link" 2>/dev/null) || continue
|
||||
case "$target" in
|
||||
gstack/*|*/gstack/*)
|
||||
rm -f "$link"
|
||||
rmdir "$dir" 2>/dev/null || true
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# 3. Remove gstack
|
||||
|
|
|
|||
Loading…
Reference in New Issue