diff --git a/pipenv/cli.py b/pipenv/cli.py index d96b9366..22d72f29 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -247,7 +247,9 @@ def do_install_dependencies(dev=False, only=False, bare=False, requirements=Fals if c.return_code != 0: click.echo(crayons.red('An error occured while installing!')) click.echo(crayons.blue(format_pip_error(c.err))) - click.echo(crayons.yellow('You can supply the --ignore-hashes option to \'pipenv install\' to bypass this feature.')) + if 'PACKAGES DO NOT MATCH THE HASHES' in c.err: + click.echo(crayons.yellow('You can supply the --ignore-hashes option to ' + '\'pipenv install\' to bypass this feature.')) sys.exit(c.return_code) if not bare: @@ -259,7 +261,9 @@ def do_install_dependencies(dev=False, only=False, bare=False, requirements=Fals if c.return_code != 0: click.echo(crayons.red('An error occured while installing!')) click.echo(crayons.blue(format_pip_error(c.err))) - click.echo(crayons.yellow('You can supply the --ignore-hashes option to pip install to bypass this feature.')) + if 'PACKAGES DO NOT MATCH THE HASHES' in c.err: + click.echo(crayons.yellow('You can supply the --ignore-hashes option to ' + '\'pipenv install\' to bypass this feature.')) sys.exit(c.return_code) if not bare: