diff --git a/scripts/check-license/src/check_license/check_license.py b/scripts/check-license/src/check_license/check_license.py index f97b02181..e889b3bec 100644 --- a/scripts/check-license/src/check_license/check_license.py +++ b/scripts/check-license/src/check_license/check_license.py @@ -5,7 +5,7 @@ import re import os -from check_license.console import echo +from check_license.console import echo_error from check_license.copyright import Copyright, CopyrightError from check_license.errors import ( LicenseCheckerError, @@ -110,7 +110,7 @@ def check_files(year: int, files: list[str]) -> bool: f.read() f.check(year) except LicenseCheckerError as e: - echo(str(e)) + echo_error(str(e)) result = True return result @@ -126,6 +126,6 @@ def update_files(year: int, files: list[str]) -> tuple[bool, int]: f.write() count += changed except LicenseCheckerError as e: - echo(str(e)) + echo_error(str(e)) result = True return result, count diff --git a/scripts/check-license/src/check_license/console.py b/scripts/check-license/src/check_license/console.py index e618d64a5..fe609480f 100644 --- a/scripts/check-license/src/check_license/console.py +++ b/scripts/check-license/src/check_license/console.py @@ -5,3 +5,8 @@ def echo(msg: str) -> None: click.echo(msg) + + +def echo_error(msg: str) -> None: + click.echo(click.style("error: ", fg="red"), nl=False) + click.echo(msg)