mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
SCons: Fix Windows silence_msvc
logfile encoding
Fix UnicodeEncodeError on cp932 environments by adding errors="replace" to log file open.
(cherry picked from commit b23b0dde9a
)
This commit is contained in:
parent
e788127654
commit
24bc49d557
1 changed files with 1 additions and 1 deletions
|
@ -316,7 +316,7 @@ def configure_msvc(env: "SConsEnvironment"):
|
|||
if not caught and (is_cl and re_cl_capture.match(line)) or (not is_cl and re_link_capture.match(line)):
|
||||
caught = True
|
||||
try:
|
||||
with open(capture_path, "a", encoding=sys.stdout.encoding) as log:
|
||||
with open(capture_path, "a", encoding=sys.stdout.encoding, errors="replace") as log:
|
||||
log.write(line + "\n")
|
||||
except OSError:
|
||||
print_warning(f'Failed to log captured line: "{line}".')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue