From cb30c792805f3a5d7900d86edf681bbe389dc64a Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Sat, 21 Jan 2017 14:22:29 -0500 Subject: [PATCH] fix bug with virtualenv locations --- pipenv/core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index 77499b22..aa1e2f57 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -25,9 +25,8 @@ class Project(object): def pipfile_exists(self): return bool(self.pipfile_location()) - @staticmethod - def virtualenv_location(): - return os.sep.join(pipfile.Pipfile.find().split(os.sep)[:-2] + ['.venv']) + def virtualenv_location(self): + return os.sep.join(self.pipfile_location().split(os.sep)[:-1] + ['.venv']) @staticmethod def pipfile_location(): @@ -440,7 +439,7 @@ def python(args): @click.command() def shell(): - # Spawn the Python process, and iteract with it. + # Spawn the Python process, and iteract with it.pip click.echo(crayons.yellow('Spawning virtualenv shell.')) shell = os.environ['SHELL']