Skip to content

Commit 404017c

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 9bcf090 commit 404017c

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
@@ -39,7 +39,7 @@ def _load_builtin_plugins_from_pyproject() -> dict[str, dict[str, str]]:
3939
finder_path = Path(__file__).resolve()
4040

4141
# Try hatchling's pyproject.toml (backend/pyproject.toml)
42-
hatchling_pyproject = finder_path.parents[4] / "pyproject.toml"
42+
hatchling_pyproject = finder_path.parents[3] / "pyproject.toml"
4343

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

0 commit comments

Comments
 (0)