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

Add os.path.expanduser call to normalize_path.

realpath by itself won't expand tildes, which could lead to things like:

pip wheel --wheel-path=~/wheels -r requirements.txt

Producing:

Destination directory: /home/foo/src/dir/~/wheels

Which is pretty much never what you wanted.
This commit is contained in:
Monty Taylor 2013-06-07 17:32:47 +02:00
parent 33bd2cc92b
commit f38ecf72d9

View file

@ -272,7 +272,7 @@ def normalize_path(path):
Convert a path to its canonical, case-normalized, absolute version.
"""
return os.path.normcase(os.path.realpath(path))
return os.path.normcase(os.path.realpath(os.path.expanduser(path)))
def splitext(path):