mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix cli option usage error
Fix IndexError exception when `more_packages` is empty and add the more informal message for argument usage. To reproduce this issue `pipenv install -e`
This commit is contained in:
@@ -1889,6 +1889,8 @@ def do_install(
|
||||
# Capture -e argument and assign it to following package_name.
|
||||
more_packages = list(more_packages)
|
||||
if package_name == '-e':
|
||||
if not more_packages:
|
||||
raise click.BadArgumentUsage('Please provide path to setup.py')
|
||||
package_name = ' '.join([package_name, more_packages.pop(0)])
|
||||
# capture indexes and extra indexes
|
||||
line = [package_name] + more_packages
|
||||
|
||||
Reference in New Issue
Block a user