fix(update): run the isolated completion child in UTF-8 mode (hardening, win-utf8 review)
The parent already decodes the child's piped output as UTF-8; -X utf8 makes the child encode it that way on any console code page. The reviewed failure was invalid on re-verification; this is the one-token hardening the triage allowed. test_update_completion_process.py failure set unchanged.
This commit is contained in:
@@ -56,7 +56,7 @@ def run_completion(request: dict) -> dict:
|
||||
request = {**request, "stdout_isatty": sys.stdout.isatty()}
|
||||
request["bytecode_cache"] = str(Path(directory) / "bytecode")
|
||||
_write_json(request_path, request)
|
||||
command = [sys.executable, "-I", "-S", "-u", "-X", f"pycache_prefix={request['bytecode_cache']}",
|
||||
command = [sys.executable, "-I", "-S", "-u", "-X", "utf8", "-X", f"pycache_prefix={request['bytecode_cache']}",
|
||||
str(root / "hermes_cli/update_completion.py"),
|
||||
str(request_path), str(result_path)]
|
||||
proc = subprocess.Popen(
|
||||
|
||||
Reference in New Issue
Block a user