From d1718247a2547494bbe3bc10aa1955308a8e1b9f Mon Sep 17 00:00:00 2001 From: AdamShannag Date: Mon, 7 Jul 2025 11:11:26 +0300 Subject: [PATCH] fix: skip reading directories in templates directory --- cmd/hookah/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/hookah/main.go b/cmd/hookah/main.go index 05715db..7b0b071 100644 --- a/cmd/hookah/main.go +++ b/cmd/hookah/main.go @@ -87,6 +87,9 @@ func parseTemplates(dirPath string) (map[string]string, error) { templates := make(map[string]string) for _, file := range dir { + if file.IsDir() { + continue + } bytes, readErr := os.ReadFile(filepath.Join(dirPath, file.Name())) if readErr != nil { return nil, fmt.Errorf("failed to read file: %w", readErr)