fix: disable private desktop for harness sandbox
This commit is contained in:
+6
-1
@@ -253,7 +253,12 @@ class StepExecutor:
|
|||||||
prompt = preamble + step_file.read_text(encoding="utf-8")
|
prompt = preamble + step_file.read_text(encoding="utf-8")
|
||||||
command = ["codex", "exec"]
|
command = ["codex", "exec"]
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
command.extend(["-c", 'windows.sandbox="unelevated"'])
|
command.extend([
|
||||||
|
"-c",
|
||||||
|
'windows.sandbox="unelevated"',
|
||||||
|
"-c",
|
||||||
|
"windows.sandbox_private_desktop=false",
|
||||||
|
])
|
||||||
command.extend([
|
command.extend([
|
||||||
"--json",
|
"--json",
|
||||||
"--sandbox",
|
"--sandbox",
|
||||||
|
|||||||
@@ -35,8 +35,13 @@ def test_invoke_codex_uses_utf8_for_unicode_prompt(tmp_path, monkeypatch):
|
|||||||
assert "Euler–Bernoulli 보" in invocation["kwargs"]["input"]
|
assert "Euler–Bernoulli 보" in invocation["kwargs"]["input"]
|
||||||
assert invocation["kwargs"]["encoding"] == "utf-8"
|
assert invocation["kwargs"]["encoding"] == "utf-8"
|
||||||
if execute.os.name == "nt":
|
if execute.os.name == "nt":
|
||||||
config_index = invocation["command"].index("-c")
|
configs = [
|
||||||
assert invocation["command"][config_index + 1] == 'windows.sandbox="unelevated"'
|
invocation["command"][index + 1]
|
||||||
|
for index, argument in enumerate(invocation["command"][:-1])
|
||||||
|
if argument == "-c"
|
||||||
|
]
|
||||||
|
assert 'windows.sandbox="unelevated"' in configs
|
||||||
|
assert "windows.sandbox_private_desktop=false" in configs
|
||||||
|
|
||||||
|
|
||||||
def test_run_git_decodes_output_as_utf8(tmp_path, monkeypatch):
|
def test_run_git_decodes_output_as_utf8(tmp_path, monkeypatch):
|
||||||
|
|||||||
Reference in New Issue
Block a user