Skip to content

Commit 4717acb

Browse files
pwx603claude
andcommitted
fix: 统一 resolver 两处 .resolve() 的 except 子句
review Minor:line 79 守卫为 (OSError, RuntimeError),而同一操作在 _contained 中守卫为 (ValueError, OSError, RuntimeError)。两处守卫漂移 正是 defect claude-code-best#4/claude-code-best#5 的形态——补齐 ValueError 使二者一致,永久杜绝该模式。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 687a0b4 commit 4717acb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mcp/ccarch/ccarch/resolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def resolve(repo_root: Path, cited: str) -> Resolved:
7676
# (Python doesn't scope names to blocks), so binding it here is
7777
# both necessary and sufficient.
7878
repo_resolved = repo_root.resolve()
79-
except (OSError, RuntimeError):
79+
except (ValueError, OSError, RuntimeError):
8080
# Path.resolve() raises RuntimeError("Symlink loop from ...") for a
8181
# circular symlink instead of OSError/ValueError like every other
8282
# unresolvable-path case. It looks redundant to catch it here, but

0 commit comments

Comments
 (0)