Skip to content

Commit 4f8e269

Browse files
committed
tools: Make Unicode from subprocess result in the CMake convert script
Fixes an issue with Python 3 in MSYS where it fails while trying to join paths where one part is Unicode (default string on Python3) and the second part are bytes (returned by the subprocess call). Closes espressif/esp-idf#5189
1 parent c5c0265 commit 4f8e269

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/cmake/convert_to_cmake.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def convert_project(project_path):
122122
for p in component_paths:
123123
if "MSYSTEM" in os.environ:
124124
cmd = ["cygpath", "-w", p]
125-
p = subprocess.check_output(cmd).strip()
125+
p = subprocess.check_output(cmd).decode('utf-8').strip()
126126

127127
converted_components += convert_component(project_path, p)
128128

0 commit comments

Comments
 (0)