warn if requested update package is not in Pipfile

Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-03-11 08:51:17 -04:00
parent 642a907f8d
commit 511c3460e6
+11
View File
@@ -362,6 +362,17 @@ def update(ctx, three=None, python=False, system=False, verbose=False, clear=Fal
)
else:
for package in ([package] + list(more_packages) or []):
if package not in core.project.all_packages:
click.echo(
'{0}: {1} was not found in your Pipfile! Aborting.'
''.format(
crayons.red('Warning', bold=True),
crayons.green(package, bold=True)
), err=True
)
sys.exit(1)
core.ensure_lockfile(keep_outdated=core.project.lockfile_exists)
# Install the dependencies.