1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Warn when dropping index URL value to directory

This commit is contained in:
Tzu-ping Chung 2018-10-01 13:36:10 +08:00
parent 356dc432f7
commit 8dcae5ba48
2 changed files with 6 additions and 0 deletions

1
news/5827.feature Normal file
View file

@ -0,0 +1 @@
A warning message is emitted when dropping an ``--[extra-]index-url`` value that points to an existing local directory.

View file

@ -216,6 +216,11 @@ class PackageFinder(object):
sort_path(os.path.join(path, item))
elif is_file_url:
urls.append(url)
else:
logger.warning(
"Path '{0}' is ignored: "
"it is a directory.".format(path),
)
elif os.path.isfile(path):
sort_path(path)
else: