Skip to content

Fix issue with duplicate "No saved connections" message in connection listing #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
10 changes: 2 additions & 8 deletions peepdb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def cli():
It supports MySQL, PostgreSQL, and MariaDB.

Usage examples:

1. Save a new database connection:
peepdb save postgres1 --db-type postgres --host localhost --user postgres --password YourPassword --database peepdb_test

Expand Down Expand Up @@ -111,13 +111,7 @@ def list():
Example:
peepdb list
"""
connections = list_connections()
if not connections:
click.echo("No saved connections.")
else:
click.echo("Saved connections:")
for name in connections:
click.echo(f"- {name}")
list_connections()


@cli.command()
Expand Down
Loading