forked from bchanot/claude
fix(memory): test covers CLAUDE.global.md guard entry; doctor asserts exact global symlink target
This commit is contained in:
@@ -63,6 +63,17 @@ check_symlink() {
|
||||
}
|
||||
|
||||
check_symlink "CLAUDE.md"
|
||||
# check_symlink only asserts the canonical path lands inside $REPO — after a
|
||||
# `git pull` without `link.sh`, ~/.claude/CLAUDE.md can still resolve inside
|
||||
# $REPO but at the wrong file (the 29-line project CLAUDE.md instead of
|
||||
# CLAUDE.global.md), passing green while the global doctrine is silently gone.
|
||||
_claude_md_target=$(readlink "$HOME/.claude/CLAUDE.md" 2>/dev/null || true)
|
||||
if [ "$_claude_md_target" != "$REPO/CLAUDE.global.md" ]; then
|
||||
# shellcheck disable=SC2088 # literal label, not a tilde-expansion attempt
|
||||
warn "~/.claude/CLAUDE.md points to $_claude_md_target — expected \
|
||||
$REPO/CLAUDE.global.md; run: bash link.sh"
|
||||
fi
|
||||
unset _claude_md_target
|
||||
check_symlink "settings.json"
|
||||
check_symlink "agents"
|
||||
check_symlink "skills"
|
||||
|
||||
Reference in New Issue
Block a user