python-semantic-release
python-semantic-release copied to clipboard
fix: use rprint instead of click.echo for Rich markup error messages
Problem
When running semantic-release --verbose --noop --strict version with no new commits since the last release, the error message is printed with literal Rich markup tags instead of formatted text:
Actual: [bold orange1]No release will be made, ...
Expected: Formatted bold orange message
Root cause
In cli/commands/version.py, the if opts.strict branch uses click.echo(err_msg, err=True) which doesn't process Rich markup. The non-strict path correctly uses rprint(err_msg).
Fix
Replace click.echo(err_msg, err=True) with rprint(err_msg, file=sys.stderr) so both paths render Rich markup consistently.
Fixes #1423