From ffe5d2f74cd61af6c73d018a9d1828a4a8133995 Mon Sep 17 00:00:00 2001 From: frostming Date: Wed, 6 Mar 2019 17:10:49 +0800 Subject: [PATCH 1/2] Overwrite environment variable --- pipenv/project.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pipenv/project.py b/pipenv/project.py index eb802cbbd9..8c813170bb 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -99,6 +99,9 @@ def preferred_newlines(f): else: PIPENV_PIPFILE = _normalized(PIPENV_PIPFILE) + # Overwrite environment variable so that subprocesses can get the correct path. + # See https://github.com/pypa/pipenv/issues/3584 + os.environ['PIPENV_PIPFILE'] = PIPENV_PIPFILE # (path, file contents) => TOMLFile # keeps track of pipfiles that we've seen so we do not need to re-parse 'em _pipfile_cache = {} From 5fc4695c1f6862b5fe26dd47ca5c82ec06e006d4 Mon Sep 17 00:00:00 2001 From: frostming Date: Wed, 6 Mar 2019 17:13:23 +0800 Subject: [PATCH 2/2] create news entry --- news/3584.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/3584.bugfix.rst diff --git a/news/3584.bugfix.rst b/news/3584.bugfix.rst new file mode 100644 index 0000000000..09684d1dcb --- /dev/null +++ b/news/3584.bugfix.rst @@ -0,0 +1 @@ +Fix the issue that lock file can't be created when ``PIPENV_PIPFILE`` is not under working directory.