Skip to content

Commit 1e30bcd

Browse files
committed
-lsa and -dui no logner closes existing running node
1 parent 652afad commit 1e30bcd

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

node_cli.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
15631584
asyncio.run(main())

0 commit comments

Comments
 (0)