diff --git a/tools/idf_py_actions/tools.py b/tools/idf_py_actions/tools.py index 9a8e735aea..8ce496298a 100644 --- a/tools/idf_py_actions/tools.py +++ b/tools/idf_py_actions/tools.py @@ -222,12 +222,12 @@ class RunTool: if p.stderr and p.stdout: # it only to avoid None type in p.std await asyncio.gather( self.read_and_write_stream(p.stderr, stderr_output_file, sys.stderr), - self.read_and_write_stream(p.stdout, stdout_output_file)) + self.read_and_write_stream(p.stdout, stdout_output_file, sys.stdout)) await p.wait() # added for avoiding None returncode return p, stderr_output_file, stdout_output_file async def read_and_write_stream(self, input_stream: asyncio.StreamReader, output_filename: str, - output_stream: TextIO=sys.stdout) -> None: + output_stream: TextIO) -> None: """read the output of the `input_stream` and then write it into `output_filename` and `output_stream`""" def delete_ansi_escape(text: str) -> str: ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])')