Skip to content

💫 Toolkit to help you get started with SDD or any other process!

fix: escape Rich markup in workflow error output (#3837)

Quratulain-bilalcf61329f26f7
diff --git a/src/specify_cli/workflows/_commands.py b/src/specify_cli/workflows/_commands.py
index 5e40569af..716b6c8a1 100644
--- a/src/specify_cli/workflows/_commands.py
+++ b/src/specify_cli/workflows/_commands.py
@@ -1383,7 +1383,7 @@ def workflow_run(
err.print(f"[red]Error:[/red] Workflow not found: {source}")
raise typer.Exit(1)
except ValueError as exc:
- err.print(f"[red]Error:[/red] Invalid workflow: {exc}")
+ err.print(f"[red]Error:[/red] Invalid workflow: {_escape_markup(str(exc))}")
raise typer.Exit(1)
# Validate
@@ -1424,10 +1424,10 @@ def workflow_run(
),
)
except ValueError as exc:
- err.print(f"[red]Error:[/red] {exc}")
+ err.print(f"[red]Error:[/red] {_escape_markup(str(exc))}")
raise typer.Exit(1)
except Exception as exc:
- err.print(f"[red]Workflow failed:[/red] {exc}")
+ err.print(f"[red]Workflow failed:[/red] {_escape_markup(str(exc))}")
raise typer.Exit(1)
if json_output: