This command can remove a plugin to the project again. The name of the plugin is the only argument to the function.
(ctx, name)
| 500 | @click.argument("name") |
| 501 | @pass_context |
| 502 | def plugins_remove_cmd(ctx, name): |
| 503 | """This command can remove a plugin to the project again. The name |
| 504 | of the plugin is the only argument to the function. |
| 505 | """ |
| 506 | project = ctx.get_project() |
| 507 | from .packages import remove_package_from_project |
| 508 | |
| 509 | try: |
| 510 | old_info = remove_package_from_project(project, name) |
| 511 | except RuntimeError as e: |
| 512 | click.echo("Error: %s" % e, err=True) |
| 513 | else: |
| 514 | if old_info is None: |
| 515 | click.echo( |
| 516 | "Package was not registered with the project. " "Nothing was removed." |
| 517 | ) |
| 518 | else: |
| 519 | click.echo( |
| 520 | "Removed package %s (%s)" |
| 521 | % ( |
| 522 | old_info["name"], |
| 523 | old_info["version"], |
| 524 | ) |
| 525 | ) |
| 526 | |
| 527 | |
| 528 | @plugins_cmd.command("list", short_help="List all plugins.") |
nothing calls this directly
no test coverage detected