fix(shell): configure PowerShell UTF-8 output

This commit is contained in:
chengyongru
2026-07-14 13:50:02 +08:00
committed by chengyongru
parent 9cdf17f5d5
commit 61afbffc89
3 changed files with 78 additions and 40 deletions
+13 -2
View File
@@ -152,7 +152,12 @@ async def test_exec_tool_uses_scope_project_as_default_cwd(tmp_path: Path) -> No
)
token = bind_workspace_scope(scope)
try:
result = await tool.execute(command="printf ok > scoped-marker.txt")
result = await tool.execute(
command=(
'python -c "from pathlib import Path; '
"Path('scoped-marker.txt').write_text('ok')\""
)
)
finally:
reset_workspace_scope(token)
@@ -174,7 +179,13 @@ async def test_exec_full_scope_allows_explicit_cwd_outside_project(tmp_path: Pat
)
token = bind_workspace_scope(scope)
try:
result = await tool.execute(command="printf ok > outside-marker.txt", working_dir=str(outside))
result = await tool.execute(
command=(
'python -c "from pathlib import Path; '
"Path('outside-marker.txt').write_text('ok')\""
),
working_dir=str(outside),
)
finally:
reset_workspace_scope(token)