mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 02:09:27 +08:00 
			
		
		
		
	cmd: make caddy fmt hints more clear (#5378)
				
					
				
			This commit is contained in:
		| @ -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
	 Emily Lange
					Emily Lange