From c32d68809bf921048487f01f5115c721943bcbb9 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Mon, 28 Jan 2019 14:22:05 -0600 Subject: [PATCH] Add extra note --- pkg/command/options.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/command/options.go b/pkg/command/options.go index 7d998f2..47b4340 100644 --- a/pkg/command/options.go +++ b/pkg/command/options.go @@ -59,6 +59,8 @@ func ParseOptions(args []string) (Options, error) { opts.Prefix = os.Getenv("URL_PREFIX") } + // Handle edge case where pgweb is started with a default host `localhost` and no user. + // When user is not set the `lib/pq` connection will fail and cause pgweb's termination. if (opts.Host == "localhost" || opts.Host == "127.0.0.1") && opts.User == "" { if username := GetCurrentUser(); username != "" { opts.User = username