only trigger --ignore-hashes suggestion when relevant

This commit is contained in:
Nate Prewitt
2017-04-18 14:56:26 -06:00
parent 6516789163
commit db4a181b2a
+6 -2
View File
@@ -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: