fix solution build fail when using Visual Studio

This commit is contained in:
Lancelot 'Robin' Chen 2024-10-09 14:52:55 +08:00
parent 4c4e673344
commit 08324108e5

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}".')