mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
only call recase_file once
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
@@ -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.
|
||||
|
||||
+4
-1
@@ -273,4 +273,7 @@ class Project(object):
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user