From 4c9bf79c76f3ce91106df7f9f179dfd4d782182d Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 4 Sep 2024 13:23:26 +0200 Subject: [PATCH] fix nit --- libs/template/renderer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/template/renderer.go b/libs/template/renderer.go index fc4a4d895b..30b4db0c99 100644 --- a/libs/template/renderer.go +++ b/libs/template/renderer.go @@ -319,7 +319,8 @@ func (r *renderer) persistToDisk() error { _, err := os.Stat(path) if err == nil { return fmt.Errorf("failed to initialize template, one or more files already exist: %s", path) - } else if !errors.Is(err, fs.ErrNotExist) { + } + if !errors.Is(err, fs.ErrNotExist) { return fmt.Errorf("error while verifying file %s does not already exist: %w", path, err) } }