Skip to content

Commit

Permalink
only call recase_file once
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth Reitz <[email protected]>
  • Loading branch information
kennethreitz committed Sep 7, 2017
1 parent 0433fd2 commit bb0719f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pipenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def ensure_pipfile(validate=True):
else:
project.add_package_to_pipfile(str(package.req))

project.recase_pipfile()

else:
click.echo(crayons.yellow('Creating a Pipfile for this project...'), err=True)
# Create the pipfile if it doesn't exist.
Expand Down
5 changes: 4 additions & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,7 @@ def add_package_to_pipfile(self, package_name, dev=False):
p[key][package_name] = package[package_name]

# Write Pipfile.
self.write_toml(recase_file(p))
self.write_toml(p)

def recase_pipfile(self):
self.write_toml(recase_file(self._pipfile))

0 comments on commit bb0719f

Please sign in to comment.