From 9fdc9fc7971a28cd2633e2aaf888968093cb1be7 Mon Sep 17 00:00:00 2001 From: frankgoldfish Date: Tue, 17 Mar 2026 11:32:35 -0700 Subject: [PATCH] fix: use rprint instead of click.echo for Rich markup error messages When `semantic-release version` is run with `--strict` and no new commits have been found, the error message containing Rich markup ([bold orange1]...) was passed to `click.echo()` instead of `rprint()`, causing the markup tags to be printed literally rather than rendered as formatted text. The non-strict path correctly used `rprint()`. This commit makes the strict path consistent by also using `rprint(file=sys.stderr)` to render the markup before writing to stderr. Fixes #1423 --- src/semantic_release/cli/commands/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/semantic_release/cli/commands/version.py b/src/semantic_release/cli/commands/version.py index 7a6fa26ef..459925af5 100644 --- a/src/semantic_release/cli/commands/version.py +++ b/src/semantic_release/cli/commands/version.py @@ -600,7 +600,7 @@ def version( # noqa: C901 ) if opts.strict: - click.echo(err_msg, err=True) + rprint(err_msg, file=sys.stderr) ctx.exit(2) rprint(err_msg)