From c183043dac63f0123d3a07bdaa5bedb0cc80489d Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Wed, 11 Sep 2024 18:14:54 +0200 Subject: [PATCH] Fix bug with wrong port --- cmd/backend/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/backend/config.go b/cmd/backend/config.go index 1a7a53d..2f8f8e3 100644 --- a/cmd/backend/config.go +++ b/cmd/backend/config.go @@ -113,7 +113,10 @@ func (c *Config) handleCliArgs() error { flag.IntVar(&port, "port", port, "port") flag.Parse() - c.Port = fmt.Sprint(":", port) + if port != 0 { + c.Port = fmt.Sprint(":", port) + } + c.ConfigFile, err = mkFile(c.ConfigFile, 0600, 0700) if err != nil { return fmt.Errorf("error setting up file: %v", err)