From e664215ab82bf578ca734f01ec97da91d3550748 Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Wed, 22 Apr 2026 19:21:16 +0300 Subject: [PATCH] fix(6): fix argparse default for foreground mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed default from 'foreground' (invalid choice) to None Now correctly handles no arguments to start in foreground mode Tested and verified: ✓ python3 start_servers.py (foreground - all 3 services running) ✓ python3 start_servers.py start (background) ✓ python3 start_servers.py status (shows all services) ✓ python3 start_servers.py stop (graceful shutdown) ✓ HTTP endpoints responding on 8916/8917 ✓ HTTPS endpoints responding on 8918/8919 (Caddy) ✓ All three services (backend, frontend, caddy) working together --- start_servers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/start_servers.py b/start_servers.py index a52df83c..5140e776 100755 --- a/start_servers.py +++ b/start_servers.py @@ -495,7 +495,7 @@ Features: 'command', nargs='?', choices=['start', 'stop', 'restart', 'status'], - default='foreground', + default=None, help='Command to execute (default: foreground mode)' ) @@ -512,6 +512,8 @@ Features: manager.run_background() elif args.command == 'status': manager.show_status() + elif args.command is None: + manager.run_foreground() else: manager.run_foreground()