diff --git a/HISTORY.rst b/HISTORY.rst index 7bac9c82..e9696882 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ PlatformIO Core 5 * Fixed a "The command line is too long" issue with a linking process on Windows (`issue #3827 `_) * Fixed an issue with `device monitor `__ when the "send_on_enter" filter didn't send EOL chars (`issue #3787 `_) +* Fixed an issue with silent mode when unwanted data is printed to stdout (`issue #3837 `_) 5.1.0 (2021-01-28) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/platform/_run.py b/platformio/platform/_run.py index 457983c4..cb5ec995 100644 --- a/platformio/platform/_run.py +++ b/platformio/platform/_run.py @@ -134,7 +134,9 @@ class PlatformRunMixin(object): args, stdout=proc.BuildAsyncPipe( line_callback=self._on_stdout_line, - data_callback=lambda data: _write_and_flush(sys.stdout, data), + data_callback=lambda data: None + if self.silent + else _write_and_flush(sys.stdout, data), ), stderr=proc.BuildAsyncPipe( line_callback=self._on_stderr_line,