From d2a1d407274eb4dc2f6c94a2c54887d80a0b0ee9 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Sun, 22 Oct 2017 16:08:46 -0700 Subject: [PATCH] add nicer message when remote requirements doesn't exist --- pipenv/cli.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index ff341e18..d70bc1dd 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -1754,7 +1754,16 @@ def install( if remote: # Download requirements file click.echo(crayons.normal(u'Remote requirements file provided! Downloading…',bold=True),err=True) - download_file(requirements, temporary_requirements) + try: + download_file(requirements, temporary_requirements) + except IOError: + click.echo( + crayons.red( + u'Unable to find requirements file at {0}.'.format(crayons.normal(requirements)) + ), + err=True + ) + sys.exit(1) # Replace the url with the temporary requirements file requirements = temporary_requirements remote = True