diff --git a/poetry/utils/exporter.py b/poetry/utils/exporter.py index 8f1ff8a273d..35ef1681842 100644 --- a/poetry/utils/exporter.py +++ b/poetry/utils/exporter.py @@ -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 @@ -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)