diff --git a/news/3842.bugfix.rst b/news/3842.bugfix.rst new file mode 100644 index 0000000000..fb21be89de --- /dev/null +++ b/news/3842.bugfix.rst @@ -0,0 +1 @@ +Resolve the symlinks when the path is absolute. diff --git a/pipenv/project.py b/pipenv/project.py index d0d668bfc8..c4b0c9419b 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -47,11 +47,10 @@ def _normalized(p): if p is None: return None loc = vistir.compat.Path(p) - if not loc.is_absolute(): - try: - loc = loc.resolve() - except OSError: - loc = loc.absolute() + try: + loc = loc.resolve() + except OSError: + loc = loc.absolute() # Recase the path properly on Windows. From https://stackoverflow.com/a/35229734/5043728 if os.name == 'nt': matches = glob.glob(re.sub(r'([^:/\\])(?=[/\\]|$)', r'[\1]', str(loc)))