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).
This commit is contained in:
Chris Lu committed 2025-12-22 00:15:33 -08:00
1 parent a2e77cb433
commit c5af6a82c7
1 file changed
+1 -1
+1 -1
View File
@@ -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)