Suppress printing unnecessary info in silent mode // Resolve #3837

This commit is contained in:
valeros
2021-03-08 12:16:53 +02:00
parent 3b2fafd789
commit 3e993156f2
2 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ PlatformIO Core 5
* Fixed a "The command line is too long" issue with a linking process on Windows (`issue #3827 <https://github.com/platformio/platformio-core/issues/3827>`_) * Fixed a "The command line is too long" issue with a linking process on Windows (`issue #3827 <https://github.com/platformio/platformio-core/issues/3827>`_)
* Fixed an issue with `device monitor <https://docs.platformio.org/page/core/userguide/device/cmd_monitor.html>`__ when the "send_on_enter" filter didn't send EOL chars (`issue #3787 <https://github.com/platformio/platformio-core/issues/3787>`_) * Fixed an issue with `device monitor <https://docs.platformio.org/page/core/userguide/device/cmd_monitor.html>`__ when the "send_on_enter" filter didn't send EOL chars (`issue #3787 <https://github.com/platformio/platformio-core/issues/3787>`_)
* Fixed an issue with silent mode when unwanted data is printed to stdout (`issue #3837 <https://github.com/platformio/platformio-core/issues/3837>`_)
5.1.0 (2021-01-28) 5.1.0 (2021-01-28)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~

View File

@@ -134,7 +134,9 @@ class PlatformRunMixin(object):
args, args,
stdout=proc.BuildAsyncPipe( stdout=proc.BuildAsyncPipe(
line_callback=self._on_stdout_line, 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( stderr=proc.BuildAsyncPipe(
line_callback=self._on_stderr_line, line_callback=self._on_stderr_line,