only touch the pipfile when it doesn't exist

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-14 18:03:31 -04:00
parent 8665047029
commit 871ea7f3d5
+2 -1
View File
@@ -381,7 +381,8 @@ def ensure_virtualenv(three=None, python=None):
def ensure_project(three=None, python=None, validate=True, system=False, warn=True):
"""Ensures both Pipfile and virtualenv exist for the project."""
project.touch_pipfile()
if not project.pipfile_exists:
project.touch_pipfile()
# Skip virtualenv creation when --system was used.
if not system: