Minor changes

This commit is contained in:
David Allen 2024-07-03 10:00:49 -06:00
parent 962cf42e79
commit c81ef3b431
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
4 changed files with 11 additions and 5 deletions

View file

@ -113,15 +113,15 @@ func RunTargets(config *configurator.Config, targets ...string) {
// write multiple files in directory using template name
err := os.MkdirAll(filepath.Clean(outputPath), 0o755)
if err != nil {
fmt.Printf("failed to make output directory: %v", err)
fmt.Printf("failed to make output directory: %v\n", err)
os.Exit(1)
}
for path, contents := range outputBytes {
filename := filepath.Base(path)
cleanPath := fmt.Sprintf("%s/%s", filepath.Clean(outputPath), filename)
err := os.WriteFile(cleanPath, contents, 0o644)
err := os.WriteFile(cleanPath, contents, 0o755)
if err != nil {
fmt.Printf("failed to write config to file: %v", err)
fmt.Printf("failed to write config to file: %v\n", err)
os.Exit(1)
}
fmt.Printf("wrote file to '%s'\n", cleanPath)