From f72c77d184de9e4b33f6bfa240c6539084bdd447 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 17 Jun 2023 11:53:23 -0400 Subject: [PATCH] fix secondary bug without we pull the sources when index is supplied. --- pipenv/utils/indexes.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pipenv/utils/indexes.py b/pipenv/utils/indexes.py index 08424618..4f078a5c 100644 --- a/pipenv/utils/indexes.py +++ b/pipenv/utils/indexes.py @@ -72,7 +72,7 @@ def get_source_list( trusted_hosts: Optional[List[str]] = None, pypi_mirror: Optional[str] = None, ) -> List[TSource]: - sources: List[TSource] = [] + sources = project.sources[:] if index: sources.append(get_project_index(project, index)) if extra_indexes: @@ -88,8 +88,6 @@ def get_source_list( if not sources or source["url"] != sources[0]["url"]: sources.append(source) - if not sources: - sources = project.sources[:] if pypi_mirror: sources = [ create_mirror_source(pypi_mirror, source["name"])