From d1c1f972a6deeb14183ed9975450f8ce9b8af122 Mon Sep 17 00:00:00 2001 From: cpavot <46565014+cpavot@users.noreply.github.com> Date: Wed, 29 Sep 2021 13:47:11 +0200 Subject: [PATCH] Propagate agent option to remote device monitor command (#4065) Signed-off-by: Christophe PAVOT --- platformio/commands/remote/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/commands/remote/command.py b/platformio/commands/remote/command.py index f9486d51..03da8389 100644 --- a/platformio/commands/remote/command.py +++ b/platformio/commands/remote/command.py @@ -336,7 +336,10 @@ def device_monitor(ctx, agents, **kwargs): kwargs["baud"] = kwargs["baud"] or 9600 def _tx_target(sock_dir): - subcmd_argv = ["remote", "device", "monitor"] + subcmd_argv = ["remote"] + for agent in agents: + subcmd_argv.extend(["--agent", agent]) + subcmd_argv.extend(["device", "monitor"]) subcmd_argv.extend(device_helpers.options_to_argv(kwargs, project_options)) subcmd_argv.extend(["--sock", sock_dir]) subprocess.call([proc.where_is_program("platformio")] + subcmd_argv)