Skip to content

Commit 4e93705

Browse files
committed
fix: prefer installed plugin in doctor checks
1 parent 2cf1f90 commit 4e93705

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/codex_usage_tracker/diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def run_doctor(
4545
) -> dict[str, Any]:
4646
"""Run read-only setup checks and return a structured report."""
4747

48-
root = repo_root or find_project_root() or _resolve_plugin_root(plugin_link)
48+
root = repo_root or _resolve_plugin_root(plugin_link) or find_project_root()
4949
checks = [
5050
_check_package_import(),
5151
_check_codex_sessions(codex_home),

tests/test_plugin_installer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,6 @@ def test_doctor_accepts_generated_plugin_directory(tmp_path: Path) -> None:
129129
checks = {check["name"]: check for check in report["checks"]}
130130

131131
assert checks["Plugin root"]["status"] == "pass"
132+
assert str(plugin_dir) in checks["Plugin root"]["detail"]
132133
assert checks["Plugin registration"]["status"] == "pass"
133134
assert checks["MCP config"]["status"] == "pass"

0 commit comments

Comments
 (0)