I'm trying to add a project directory to the PYTHONPATH using pipenv. Following the hint of this post, I created a .env file in order to modify the path used by the virtualenv managed by pipenv.
I created the .env file (in /foo/bar/myProject) as follows:
PYTHONPATH=${PYTHONPATH}:${PWD}
but when I activate the virtualenv, this is the new path:
$ python -c "import sys; print(sys.path)"
['', '/foo/bar/${PYTHONPATH}', '/foo/bar/${PWD}', '/foo/bar/myProject',...]
It correctly adds /foo/bar/myProject to the PYTHONPATH. However, looks like it adds also two extra entries with unsubstituted environment variables.
Why does it happen and how can I avoid this?
Note: I'm using the Z shell (probably it does not matter).