Răsfoiți Sursa

Merge branch 'bugfix/build_color_output_windows' into 'master'

tools: idf.py: use actual sys.stdout instead of the memoized one

See merge request espressif/esp-idf!19847
Roland Dobai 3 ani în urmă
părinte
comite
cb81d14892
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      tools/idf_py_actions/tools.py

+ 2 - 2
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-?]*[ -/]*[@-~])')