Skip to content

Commit

Permalink
provider: fix vcs subdirectory propagation
Browse files Browse the repository at this point in the history
This change ensures that when complete packages are created dependency
inherits subdirectory from package if supported.
  • Loading branch information
abn committed Oct 6, 2021
1 parent 1187f63 commit 37aa1e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions poetry/puzzle/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ def search_for_vcs(self, dependency: VCSDependency) -> List[Package]:
dependency._source_reference = package.source_reference
dependency._source_resolved_reference = package.source_resolved_reference

if hasattr(package, "source_subdirectory") and hasattr(
dependency, "_source_subdirectory"
):
# this is supported only for poetry-core >= 1.1.0a7
dependency._source_subdirectory = package.source_subdirectory

self._deferred_cache[dependency] = package

return [package]
Expand Down

0 comments on commit 37aa1e9

Please sign in to comment.