Skip to content

Commit 79789a4

Browse files
authored
Decode messages from dotnet tool as UTF-8 (#1204)
If 'dotnet tool' outputs non-ASCII characters and the system locale is not 'utf-8', then 'update_deps.py' can fail due to UnicodeDecodeError. This commit addresses the above issue by explicitly setting 'utf-8' when calling subprocess.Popen. Closes #1203 PiperOrigin-RevId: 736025736
1 parent 86a534f commit 79789a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/build_tools/update_deps.py

+1
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ def exec_command(
408408
process = subprocess.Popen(
409409
args,
410410
cwd=cwd,
411+
encoding='utf-8',
411412
shell=False,
412413
stdout=subprocess.PIPE,
413414
text=True,

0 commit comments

Comments
 (0)