From 87f35eef0f2d16a7269634a5c85d43c75d2f12e9 Mon Sep 17 00:00:00 2001 From: David Allen Date: Wed, 26 Jun 2024 14:20:52 -0600 Subject: [PATCH] Fixed output path file name with multiple targets --- cmd/generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/generate.go b/cmd/generate.go index 2ef58a6..2e973ba 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -109,7 +109,7 @@ var generateCmd = &cobra.Command{ // write multiple files in directory using template name for _, contents := range outputBytes { // FIXME: fix output paths to not overwrite each other with multiple templates - err := os.WriteFile(fmt.Sprintf("%s/%s.%s", filepath.Clean(outputPath), target, ".conf"), contents, 0o644) + err := os.WriteFile(fmt.Sprintf("%s/%s.%s", filepath.Clean(outputPath), target, "conf"), contents, 0o644) if err != nil { fmt.Printf("failed to write config to file: %v", err) os.Exit(1)