Skip to content

Commit

Permalink
Add color to latest version message (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhargavh committed Mar 31, 2021
1 parent a6d5cf4 commit ef3cd7f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cve_bin_tool/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ def check_latest_version():
)
)
else:
# TODO In future mark me with some color ( prefer yellow or red )
LOGGER.info(
f"You are running version {VERSION} of {name} but the latest PyPI Version is {pypi_version}."
f"[bold red]You are running version {VERSION} of {name} but the latest PyPI Version is {pypi_version}.[/]",
extra={"markup": True},
)
if version.parse(VERSION) < version.parse(pypi_version):
LOGGER.info("Alert: We recommend using the latest stable release.")
LOGGER.info(
"[bold yellow]Alert: We recommend using the latest stable release.[/]",
extra={"markup": True},
)
except Exception as error:
LOGGER.warning(
textwrap.dedent(
Expand Down

0 comments on commit ef3cd7f

Please sign in to comment.