Ensure that the `monitor` target is not executed if any of the preceding targets encounter failures

This commit is contained in:
Ivan Kravets
2023-07-15 15:15:21 +03:00
parent 390755c499
commit 0fe6bf262e
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ PlatformIO Core 6
* Resolved an issue that caused generated projects for `PlatformIO IDE for VSCode <https://docs.platformio.org/en/latest/integration/ide/vscode.html>`__ to break when the ``-iprefix`` compiler flag was used
* Resolved an issue encountered while utilizing the `pio pkg exec <https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_exec.html>`__ command on the Windows platform to execute Python scripts from a package
* Implemented a crucial improvement to the `pio run <https://docs.platformio.org/en/latest/core/userguide/cmd_run.html>`__ command, guaranteeing that the ``monitor`` target is not executed if any of the preceding targets, such as ``upload``, encounter failures
6.1.9 (2023-07-06)
~~~~~~~~~~~~~~~~~~

View File

@ -207,7 +207,7 @@ def process_env(
verbose,
).process()
if "monitor" in targets and "nobuild" not in targets:
if result["succeeded"] and "monitor" in targets and "nobuild" not in targets:
ctx.invoke(
device_monitor_cmd,
port=monitor_port,