Skip to content

Commit 266b3e9

Browse files
chadaustinfacebook-github-bot
authored andcommitted
substitute surrogates in log file (#8076)
Summary: Pull Request resolved: facebookincubator/below#8076 D26025779 (5ab476f) may have broken the getdeps build when logging surrogates. Use errors=surrogateescape to try to avoid that. Reviewed By: danobi Differential Revision: D26079717 fbshipit-source-id: 98d938bfced417e0b39a6dcddb241225ffb69c06
1 parent 4601945 commit 266b3e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/fbcode_builder/getdeps/runcmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def log_to_stdout(msg):
5151
sys.stdout.buffer.write(msg.encode(errors="surrogateescape"))
5252

5353
if log_file is not None:
54-
with open(log_file, "a", encoding="utf-8") as log:
54+
with open(log_file, "a", encoding="utf-8", errors="surrogateescape") as log:
5555

5656
def log_function(msg):
5757
log.write(msg)

0 commit comments

Comments
 (0)