From f5a7833ca9541d1ebb6a8d5a5eb6a7afc46926d2 Mon Sep 17 00:00:00 2001 From: pauhull <22707808+pauhull@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:37:07 +0100 Subject: [PATCH] change file not exist error handling Co-authored-by: Jonas L. --- internal/state/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/state/state.go b/internal/state/state.go index 06619360..574d05c6 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -64,7 +64,7 @@ func ReadConfig(path string) (*Config, error) { _, err := os.Stat(path) if err != nil { if os.IsNotExist(err) { - err = nil + return cfg, nil } return cfg, err }