add capture for editable

This commit is contained in:
Nate Prewitt
2017-05-21 18:29:19 -07:00
parent 41178eeec0
commit ea22a84bd3
+8 -1
View File
@@ -800,7 +800,10 @@ def cli(ctx, where=False, venv=False, rm=False, bare=False, three=False, python=
click.echo(format_help(ctx.get_help()))
@click.command(help="Installs provided packages and adds them to Pipfile, or (if none is given), installs all packages.")
@click.command(help="Installs provided packages and adds them to Pipfile, or (if none is given), installs all packages.", context_settings=dict(
ignore_unknown_options=True,
allow_extra_args=True
))
@click.argument('package_name', default=False)
@click.argument('more_packages', nargs=-1)
@click.option('--dev', '-d', is_flag=True, default=False, help="Install package(s) in [dev-packages].")
@@ -819,6 +822,10 @@ def install(package_name=False, more_packages=False, dev=False, three=False, pyt
# Ensure that virtualenv is available.
ensure_project(three=three, python=python)
# Capture -e argument and assign it to following package_name.
if package_name == '-e':
package_name = ' '.join(package_name, more_packages.pop(0))
# Allow more than one package to be provided.
package_names = (package_name,) + more_packages