on main help sign in
Replace POSTGRES_URL env var with DB_URL

Also fixes the documentation which was incorrect before.

commit5529d224b6cefa807852a6599e419d5aa68f3d9f authorfabianlindfors <fabian@flapplabs.se> dateThu 3 Feb 2022, 23:27 (5 years ago) parent033ac5b
2 files changed+2−2
README.md+1−1 src/main.rs+1−1
README.md+1−1
@@ -563,7 +563,7 @@ The options below can be used with all commands that communicate with Postgres.
563563
564564| Option | Default | Description |
565565| ------ | ------- | ----------- |
566−| `--url` | | URI to connect to your Postgres database.<br>Can also be provided with the environment variable `DATABASE_URL`. |
566+| `--url` | | URI to connect to your Postgres database.<br>Can also be provided with the environment variable `DB_URL`. |
567567| `--host` | `localhost` | Hostname to use when connecting to Postgres |
568568| `--port` | `5432` | Port which Postgres is listening on |
569569| `--database` | `postgres` | Database name |
src/main.rs+1−1
@@ -105,7 +105,7 @@ fn run(opts: Opts) -> anyhow::Result<()> {
105105}
106106
107107fn reshape_from_connection_options(opts: &ConnectionOptions) -> anyhow::Result<Reshape> {
108− let env_url = std::env::var("POSTGRES_URL").ok();
108+ let env_url = std::env::var("DB_URL").ok();
109109 let url = env_url.as_ref().or_else(|| opts.url.as_ref());
110110
111111 match url {