mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
f3c6aa975d
Currently RunTool reads command's output with asyncio read, which returns bytes. This is decoded into python's string and the output already contains OS specific line endings, which on Windows is CRLF. Problem is that the command output is saved by using python's text stream/file, which replaces LF, native python's line ending, with OS specific line ending. On Windows, and in this particular case, the CRLF from the command output is translated into CRCRLF and saved in the commands output file. When this file is read in again, e.g. for hint modules, the CRCRLF is replaced with LFLF. Again the file is open as text file. Meaning a new emply line is added. Fix this by opening the output file with "newline=''", which prevents this translation. We already have the OS specific line ending in the command's output. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>