From 163664b28b6be114920518ad9dc1abc9da95956f Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 5 Feb 2026 14:10:46 -0400 Subject: [PATCH] if no file is given for script prompt for it --- src/meshcore_cli/meshcore_cli.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 4e80806..168f735 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -3487,8 +3487,13 @@ async def next_cmd(mc, cmds, json_output=False): await interactive_loop(mc, to=contact) case "script" : - argnum = 1 - await process_script(mc, cmds[1], json_output=json_output) + if len(cmds) > 1: + argnum = 1 + filename = cmds[1] + else: + file_name = await prompt_for_file() + if not file_name is None: + await process_script(mc, file_name, json_output=json_output) case _ : contact = await get_contact_from_arg(mc, cmds[0])