diff --git a/HISTORY.rst b/HISTORY.rst index b87270c6..014fc8f3 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,7 @@ PlatformIO Core 6 * Resolved an issue that caused generated projects for `PlatformIO IDE for VSCode `__ to break when the ``-iprefix`` compiler flag was used * Resolved an issue encountered while utilizing the `pio pkg exec `__ command on the Windows platform to execute Python scripts from a package +* Implemented a crucial improvement to the `pio run `__ 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) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/run/cli.py b/platformio/run/cli.py index dc3eb2ee..1ed84a48 100644 --- a/platformio/run/cli.py +++ b/platformio/run/cli.py @@ -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,