Remove a workflow catalog source by index.
(
index: int = typer.Argument(..., help="Catalog index to remove (from 'catalog list')"),
)
| 1026 | |
| 1027 | @workflow_catalog_app.command("remove") |
| 1028 | def workflow_catalog_remove( |
| 1029 | index: int = typer.Argument(..., help="Catalog index to remove (from 'catalog list')"), |
| 1030 | ): |
| 1031 | """Remove a workflow catalog source by index.""" |
| 1032 | from .catalog import WorkflowCatalog, WorkflowValidationError |
| 1033 | |
| 1034 | project_root = _require_specify_project() |
| 1035 | catalog = WorkflowCatalog(project_root) |
| 1036 | try: |
| 1037 | removed_name = catalog.remove_catalog(index) |
| 1038 | except WorkflowValidationError as exc: |
| 1039 | console.print(f"[red]Error:[/red] {exc}") |
| 1040 | raise typer.Exit(1) |
| 1041 | |
| 1042 | console.print(f"[green]✓[/green] Catalog source '{removed_name}' removed") |
| 1043 | |
| 1044 | |
| 1045 | # ===== Workflow Step Commands ===== |
nothing calls this directly
no test coverage detected