Skip to content

Commit

Permalink
exporter: use path_to_url from core
Browse files Browse the repository at this point in the history
  • Loading branch information
maxispeicher committed Oct 8, 2020
1 parent aab710a commit a6c4f9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion poetry/utils/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from clikit.api.io import IO

from poetry.core.packages.utils.utils import path_to_url
from poetry.poetry import Poetry
from poetry.utils._compat import Path
from poetry.utils._compat import decode
Expand Down Expand Up @@ -95,7 +96,7 @@ def _export_requirements_txt(
if is_direct_remote_reference:
line = requirement
elif is_direct_local_reference:
dependency_uri = Path(dependency.source_url).resolve().as_uri()
dependency_uri = path_to_url(dependency.source_url)
line = "{} @ {}".format(dependency.name, dependency_uri)
else:
line = "{}=={}".format(package.name, package.version)
Expand Down

0 comments on commit a6c4f9a

Please sign in to comment.