We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38e9bbe commit d693c12Copy full SHA for d693c12
news/6823.bugfix.rst
@@ -0,0 +1 @@
1
+Better preserve original casing when a path is displayed.
src/pip/_internal/utils/misc.py
@@ -190,10 +190,10 @@ def rmtree_errorhandler(
190
def display_path(path: str) -> str:
191
"""Gives the display value for a given path, making it relative to cwd
192
if possible."""
193
- path = os.path.normcase(os.path.abspath(path))
194
- if path.startswith(os.getcwd() + os.path.sep):
195
- path = "." + path[len(os.getcwd()) :]
196
- return path
+ rel = os.path.relpath(path)
+ if rel[:2] == "..":
+ return path
+ return os.path.join(".", rel)
197
198
199
def backup_dir(dir: str, ext: str = ".bak") -> str:
0 commit comments