File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1560,4 +1560,25 @@ async def main():
15601560 await asyncio .sleep (1 )
15611561
15621562
1563+ def handle_inspection_commands ():
1564+ """Handle inspection commands that should not kill existing node processes."""
1565+ parser = argparse .ArgumentParser (add_help = False )
1566+ parser .add_argument ("-lsa" , "--list-apps" , action = "store_true" )
1567+ parser .add_argument ("-dui" , "--dump-ui" , action = "store" )
1568+
1569+ # Parse only known args to avoid errors from other arguments
1570+ args , _ = parser .parse_known_args ()
1571+
1572+ if args .list_apps :
1573+ list_available_apps ()
1574+ sys .exit (0 )
1575+
1576+ if args .dump_ui :
1577+ generate_ui_dump (args .dump_ui )
1578+ sys .exit (0 )
1579+
1580+
1581+ # Handle inspection commands before starting main process
1582+ handle_inspection_commands ()
1583+
15631584asyncio .run (main ())
You can’t perform that action at this time.
0 commit comments