mirror of
https://github.com/davidallendj/configurator.git
synced 2025-12-20 03:27:02 -07:00
Minor changes
This commit is contained in:
parent
962cf42e79
commit
c81ef3b431
4 changed files with 11 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue