Fixed output path file name with multiple targets
This commit is contained in:
parent
251088088f
commit
87f35eef0f
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue