mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
add nicer message when remote requirements doesn't exist
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user