warn the user of import requirements.txt side-effects.

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2017-09-15 12:34:07 -04:00
parent ba2aed74b1
commit a222865766
+12
View File
@@ -269,6 +269,18 @@ def ensure_pipfile(validate=True):
# Import requirements.txt.
import_requirements()
# Warn the user of side-effects.
click.echo(
u'{0}: Your {1} now contains pinned versions, if your {2} did. \n'
'We recommend updating your {1} to specify the {3} version, instead.'
''.format(
crayons.red('Warning', bold=True),
crayons.white('Pipfile', bold=True),
crayons.white('requirements.txt', bold=True),
crayons.white('"*"', bold=True)
)
)
else:
puts(crayons.white(u'Creating a Pipfile for this project…', bold=True), err=True)