summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/commandfuncs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/commandfuncs.go b/cmd/commandfuncs.go
index bc62f28..ec56ab9 100644
--- a/cmd/commandfuncs.go
+++ b/cmd/commandfuncs.go
@@ -567,7 +567,7 @@ func cmdFmt(fl Flags) (int, error) {
if fl.Bool("overwrite") {
if err := os.WriteFile(formatCmdConfigFile, output, 0600); err != nil {
- return caddy.ExitCodeFailedStartup, nil
+ return caddy.ExitCodeFailedStartup, fmt.Errorf("overwriting formatted file: %v", err)
}
} else {
fmt.Print(string(output))