Skip to content

Commit

Permalink
Fix provider.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 committed Feb 26, 2022
1 parent f844965 commit ddbbc9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/poetry/puzzle/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,15 @@ def search_for_vcs(self, dependency: "VCSDependency") -> List["Package"]:
if dependency in self._deferred_cache:
return [self._deferred_cache[dependency]]

directory = dependency.directory if hasattr(dependency, "directory") else None

package = self.get_package_from_vcs(
dependency.vcs,
dependency.source,
branch=dependency.branch,
tag=dependency.tag,
rev=dependency.rev,
directory=dependency.directory,
directory=directory,
name=dependency.name,
)
package.develop = dependency.develop
Expand Down Expand Up @@ -218,7 +220,10 @@ def get_package_from_vcs(
if vcs != "git":
raise ValueError(f"Unsupported VCS dependency {vcs}")

suffix = url.split("/")[-1][:-4]
suffix = url.split("/")[-1]
if suffix.endswith(".git"):
suffix = suffix[:-4]

tmp_dir = Path(mkdtemp(prefix=f"pypoetry-git-{suffix}"))

try:
Expand Down

0 comments on commit ddbbc9c

Please sign in to comment.