Skip to content

Commit 639d60b

Browse files
committed
fix: standardize on CODER_PG_CONNECTION_URL
Fixes #7513.
1 parent ba3e6ce commit 639d60b

4 files changed

+7
-7
lines changed

cli/server_createadminuser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (r *RootCmd) newCreateAdminUserCommand() *clibase.Cmd {
238238

239239
createAdminUserCommand.Options.Add(
240240
clibase.Option{
241-
Env: "CODER_POSTGRES_URL",
241+
Env: "CODER_PG_CONNECTION_URL",
242242
Flag: "postgres-url",
243243
Description: "URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).",
244244
Value: clibase.StringOf(&newUserDBURL),

cli/server_createadminuser_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func TestServerCreateAdminUser(t *testing.T) {
157157
defer cancel()
158158

159159
inv, _ := clitest.New(t, "server", "create-admin-user")
160-
inv.Environ.Set("CODER_POSTGRES_URL", connectionURL)
160+
inv.Environ.Set("CODER_PG_CONNECTION_URL", connectionURL)
161161
inv.Environ.Set("CODER_SSH_KEYGEN_ALGORITHM", "ed25519")
162162
inv.Environ.Set("CODER_USERNAME", username)
163163
inv.Environ.Set("CODER_EMAIL", email)

cli/testdata/coder_server_create-admin-user_--help.golden

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ to every organization.
1212
The password of the new user. If not specified, you will be prompted
1313
via stdin.
1414

15-
--postgres-url string, $CODER_POSTGRES_URL
15+
--postgres-url string, $CODER_PG_CONNECTION_URL
1616
URL of a PostgreSQL database. If empty, the built-in PostgreSQL
1717
deployment will be used (Coder must not be already running in this
1818
case).

docs/cli/server_create-admin-user.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ The password of the new user. If not specified, you will be prompted via stdin.
3232

3333
### --postgres-url
3434

35-
| | |
36-
| ----------- | -------------------------------- |
37-
| Type | <code>string</code> |
38-
| Environment | <code>$CODER_POSTGRES_URL</code> |
35+
| | |
36+
| ----------- | ------------------------------------- |
37+
| Type | <code>string</code> |
38+
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
3939

4040
URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).
4141

0 commit comments

Comments
 (0)