From c5af6a82c71941e3a250b8d5038e12105d4b275b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 21 Dec 2025 22:30:57 -0800 Subject: [PATCH] fix: don't print usage on port allocation error When a port allocation fails (e.g., explicit port is unavailable), exit immediately without showing the usage example. This provides cleaner error output when the error is expected (port conflict). --- weed/command/mini.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/command/mini.go b/weed/command/mini.go index 41cdcd078..12d51a8f0 100644 --- a/weed/command/mini.go +++ b/weed/command/mini.go @@ -706,7 +706,7 @@ func runMini(cmd *Command, args []string) bool { // Ensure all ports are available, find alternatives if needed if err := ensureAllPortsAvailableOnIP(bindIp); err != nil { glog.Errorf("Port allocation failed: %v", err) - return false + os.Exit(1) } // Set master.peers to "none" if not specified (single master mode)