mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-07 04:43:10 -04:00
cmd: make caddy fmt hints more clear (#5378)
This commit is contained in:
1 parent
5ded580444
commit
bf54892a73
2 files changed
+5
-2
No files matched your search
+4
-1
@@ -589,7 +589,10 @@ func cmdFmt(fl Flags) (int, error) {
|
||||
}
|
||||
|
||||
if warning, diff := caddyfile.FormattingDifference(formatCmdConfigFile, input); diff {
|
||||
return caddy.ExitCodeFailedStartup, fmt.Errorf("%s:%d: Caddyfile input is not formatted", warning.File, warning.Line)
|
||||
return caddy.ExitCodeFailedStartup, fmt.Errorf(`%s:%d: Caddyfile input is not formatted; Tip: use '--overwrite' to update your Caddyfile in-place instead of previewing it. Consult '--help' for more options`,
|
||||
warning.File,
|
||||
warning.Line,
|
||||
)
|
||||
}
|
||||
|
||||
return caddy.ExitCodeSuccess, nil
|
||||
|
||||
Reference in new issue
Block a user