Skip to content

Commit

Permalink
Merge pull request #5836 from uranusjr/bugfix-warn-directory-path-dro…
Browse files Browse the repository at this point in the history
…p-index-url

Warn when dropping index URL value to directory
  • Loading branch information
cjerdonek committed Oct 8, 2018
2 parents 9d070c0 + 8dcae5b commit 69b5917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/5827.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A warning message is emitted when dropping an ``--[extra-]index-url`` value that points to an existing local directory.
5 changes: 5 additions & 0 deletions src/pip/_internal/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ def sort_path(path):
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:
Expand Down

0 comments on commit 69b5917

Please sign in to comment.