Skip to content

Commit

Permalink
Normalizing paths while checking filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshks committed Apr 1, 2020
1 parent 8296b87 commit 0e208e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pip/_internal/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from pip._internal.utils.misc import (
dist_is_editable,
get_installed_distributions,
normalize_path,
write_output,
)
from pip._internal.utils.packaging import get_installer
Expand Down Expand Up @@ -145,7 +146,8 @@ def run(self, options, args):
# from current directory
paths = options.path
if paths is None:
paths = [item for item in sys.path if item and item != os.getcwd()]
paths = [item for item in sys.path if item and
normalize_path(item) != normalize_path(os.getcwd())]

packages = get_installed_distributions(
local_only=options.local,
Expand Down

0 comments on commit 0e208e0

Please sign in to comment.