Skip to content

Commit c9dd880

Browse files
committed
only print PostgREST/PostGraphile passwords if enabled 🐛
related: derhuerst/berlin-gtfs-rt-server#5 (comment)
1 parent 3d56854 commit c9dd880

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2023 Jannis R and contributors.
1+
Copyright 2024 Jannis R and contributors.
22

33
This software is licensed under License Zero Prosperity 3.0.0 and contributions are licensed under Apache 2.0.
44

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ const convertGtfsToSql = async function* (files, opt = {}) {
4444
statsActiveTripsByHour,
4545
} = opt
4646
let postgraphilePassword = opt.postgraphilePassword
47-
if (postgraphilePassword === null) {
47+
if (opt.postgraphile && postgraphilePassword === null) {
4848
postgraphilePassword = randomBytes(10).toString('hex')
4949
console.error(`PostGraphile PostgreSQL user's password:`, postgraphilePassword)
5050
}
5151
let postgrestPassword = opt.postgrestPassword
52-
if (postgrestPassword === null) {
52+
if (opt.postgrest && postgrestPassword === null) {
5353
postgrestPassword = randomBytes(10).toString('hex')
5454
console.error(`PostrREST PostgreSQL user's password:`, postgrestPassword)
5555
}

0 commit comments

Comments
 (0)