Skip to content

Commit 5ca391c

Browse files
Fix pyproject.toml path calculation in plugin finder
Corrects the parent directory index from parents[4] to parents[3] to properly locate backend/pyproject.toml. The incorrect path prevented built-in plugins (like the regex version source) from being discovered during bootstrap/CI builds, causing "Unknown plugin" errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e1e5309 commit 5ca391c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/hatchling/plugin/finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _load_builtin_plugins_from_pyproject() -> dict[str, dict[str, str]]:
4343
finder_path = Path(__file__).resolve()
4444

4545
# Try hatchling's pyproject.toml (backend/pyproject.toml)
46-
hatchling_pyproject = finder_path.parents[4] / "pyproject.toml"
46+
hatchling_pyproject = finder_path.parents[3] / "pyproject.toml"
4747

4848
# Try hatch's pyproject.toml (../../pyproject.toml from hatchling)
4949
hatch_pyproject = hatchling_pyproject.parent.parent / "pyproject.toml"

0 commit comments

Comments
 (0)