This commit is contained in:
Robin Chen 2024-10-22 22:13:30 +02:00 committed by GitHub
commit 19f76fa257
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -438,7 +438,7 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
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="utf-8") as log:
log.write(line + "\n")
except OSError:
print_warning(f'Failed to log captured line: "{line}".')