From 5e54e32a2a2ec34ac905881dafbf5707e8165dce Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 20 Jan 2017 16:29:35 -0500 Subject: [PATCH] fixes --- pipenv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pipenv.py b/pipenv.py index 6b261973..ceda7379 100644 --- a/pipenv.py +++ b/pipenv.py @@ -303,7 +303,7 @@ def cli(*args, **kwargs): def init(dev=False): # Assert Pipfile exists. - if project.pipfile_exists: + if not project.pipfile_exists: click.echo(crayons.yellow('Creating a Pipfile for this project...')) # Create the pipfile if it doesn't exist. @@ -334,8 +334,8 @@ def init(dev=False): if not lockfile['_meta']['Pipfile-sha256'] == p.hash: click.echo(crayons.red('Pipfile.freeze out of date, updating...')) - # Update the lockfile. - # TODO: Add sub-dependencies. + do_freeze() + with open(project.lockfile_location(), 'w') as f: f.write(p.freeze())