Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

fix: invert the condition for certs output #505

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/codegate/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def serve(
ca = CertificateAuthority.get_instance()

certs_check = ca.check_and_ensure_certificates()
if certs_check:
if not certs_check:
Copy link

@lukehinds lukehinds Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted , may as well rename to certs_exist , it then reads out nicely 'if not certs_exist'

click.echo("New Certificates generated successfully.")
else:
click.echo("Existing Certificates are already present.")
Expand Down Expand Up @@ -515,7 +515,7 @@ def generate_certs(
ca.remove_certificates()

certs_check = ca.check_and_ensure_certificates()
if certs_check:
if not certs_check:
logger.info("New Certificates generated successfully.")
else:
logger.info("Existing Certificates are already present.")
Expand Down
Loading