refactor: remove DATABASE_URL auto-connection

This commit is contained in:
Valdemar Lorenzen
2026-10-19 12:40:28 +02:00
parent 8d533f13dc
commit 7dbbe75ce7
+3 -5
View File
@@ -13,11 +13,9 @@ Usage:
dbdash --sqlite PATH
dbdash --help
Run without a connection argument and without DATABASE_URL to connect in-app.
Otherwise DATABASE_URL supplies the PostgreSQL connection when no argument is given.
Prefer the environment variable to keep passwords out of process arguments:
export DATABASE_URL='postgresql://user@localhost:5432/database'
Run without a connection argument to open the in-app connection screen:
cargo run
Use the in-app password field to keep credentials out of process arguments.
Open an existing SQLite database file (read-only; missing files are not created):
cargo run -- --sqlite ./database.sqlite
@@ -78,7 +76,7 @@ fn run() -> Result<()> {
.ok_or("--sqlite requires a database file path; see dbdash --help")?,
)
} else {
argument.or_else(|| std::env::var_os("DATABASE_URL"))
argument
};
if args.next().is_some() {
return Err("unexpected extra arguments; see dbdash --help".into());