mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
detect virtualenvs better
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
+6
-1
@@ -74,7 +74,12 @@ class Project(object):
|
||||
def virtualenv_exists(self):
|
||||
# TODO: Decouple project from existence of Pipfile.
|
||||
if self.pipfile_exists:
|
||||
return os.path.isdir(self.virtualenv_location)
|
||||
if os.name == 'nt':
|
||||
extra = ['Scripts', 'activate.bat']
|
||||
else:
|
||||
extra = ['bin', 'activate']
|
||||
return os.path.isfile(os.sep.join([self.virtualenv_location] + extra))
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user