Skip to content

Commit 0e208e0

Browse files
committed
Normalizing paths while checking filesystem
1 parent 8296b87 commit 0e208e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pip/_internal/commands/list.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from pip._internal.utils.misc import (
2121
dist_is_editable,
2222
get_installed_distributions,
23+
normalize_path,
2324
write_output,
2425
)
2526
from pip._internal.utils.packaging import get_installer
@@ -145,7 +146,8 @@ def run(self, options, args):
145146
# from current directory
146147
paths = options.path
147148
if paths is None:
148-
paths = [item for item in sys.path if item and item != os.getcwd()]
149+
paths = [item for item in sys.path if item and
150+
normalize_path(item) != normalize_path(os.getcwd())]
149151

150152
packages = get_installed_distributions(
151153
local_only=options.local,

0 commit comments

Comments
 (0)