Always print the fucking diff

This commit is contained in:
2025-10-28 10:27:47 +01:00
parent e76164f89c
commit 1e850ecbea

View File

@@ -175,6 +175,10 @@ func syncConfigs(config *Config) error {
// File doesn't exist, create it
fileLogger.Info("Creating new file")
created++
// Print the diff as if the old content was empty and the new content is expectedContent
generateAndLogDiff(fileLogger, caddyFilename, "", expectedContent)
if !*dryRun {
if err := writeFile(caddyFilename, expectedContent); err != nil {
return fmt.Errorf("failed to create file %s: %w", caddyFilename, err)