writeConfig writes the config to the target path and prints a banner
(configPath, ocAdminServicePassword, targetBackupConfig string, yamlOutput []byte, adminPWgenerated, quiet bool)
| 72 | |
| 73 | // writeConfig writes the config to the target path and prints a banner |
| 74 | func writeConfig(configPath, ocAdminServicePassword, targetBackupConfig string, yamlOutput []byte, adminPWgenerated, quiet bool) error { |
| 75 | targetPath := path.Join(configPath, configFilename) |
| 76 | err := os.WriteFile(targetPath, yamlOutput, 0600) |
| 77 | if err != nil { |
| 78 | return err |
| 79 | } |
| 80 | if !quiet { |
| 81 | printBanner(targetPath, ocAdminServicePassword, adminPWgenerated, targetBackupConfig) |
| 82 | } |
| 83 | return nil |
| 84 | } |
| 85 | |
| 86 | // writePatch writes the diff to a file |
| 87 | func writePatch(configPath string, yamlOutput []byte) error { |
no test coverage detected