Skip to content

Commit

Permalink
tolerate poetry init in /
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 15, 2022
1 parent ed26721 commit a554448
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/poetry/layouts/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ def package_path(self) -> Path:
def get_package_include(self) -> InlineTable | None:
package = inline_table()

include = self._package_path_relative.parts[0]
parts = self._package_path_relative.parts
if not parts:
return None

include = parts[0]
package.append("include", include) # type: ignore[no-untyped-call]

if self.basedir != Path():
Expand Down

0 comments on commit a554448

Please sign in to comment.