fix(shell): narrow PowerShell UTF-8 configuration

Avoid changing native pipeline input encoding and consolidate real PowerShell checks to reduce Windows runner startup flakiness.
This commit is contained in:
chengyongru
2026-07-14 13:50:02 +08:00
committed by chengyongru
parent 9f8c2cb1bf
commit 1643aa7ef5
2 changed files with 7 additions and 14 deletions
-1
View File
@@ -537,7 +537,6 @@ class ExecTool(Tool):
command = ExecTool._normalize_powershell_command(command)
command = (
"[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)\n"
"$OutputEncoding = [Console]::OutputEncoding\n"
"$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'\n"
f"{command}\n"
"if ($LASTEXITCODE -ne $null) { exit $LASTEXITCODE }"