Files
glm-coding-helper/scripts/setup_backend.ps1
T
OLmatter d06c69f132 fix(ps1): add UTF-8 BOM to all .ps1 to fix PS 5.1 ParserError on CN Windows
PS 5.1 on Chinese Windows reads non-BOM files as the system ANSI codepage
(GBK), so UTF-8 Chinese bytes corrupt parsing and surface as
'Missing expression after comma' at param blocks. Adding EF BB BF BOM forces
PS 5.1 to interpret as UTF-8. Affects one_click_start.ps1 (the .cmd entry),
bootstrap_windows.ps1, start_backend.ps1, setup_backend.ps1,
start-backend-pipeline-gui.ps1, and the release scripts.
2026-06-23 03:07:52 +08:00

24 lines
599 B
PowerShell

param(
[ValidateSet("auto", "cpu", "gpu", "both")]
[string]$Target = "auto",
[switch]$Recreate,
[switch]$SkipInstall,
[switch]$NoSmokeTest,
[string[]]$PipArg = @()
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
Set-Location $Root
$argsList = @("scripts\setup_backend.py", "--target", $Target)
if ($Recreate) { $argsList += "--recreate" }
if ($SkipInstall) { $argsList += "--skip-install" }
if ($NoSmokeTest) { $argsList += "--no-smoke-test" }
foreach ($arg in $PipArg) {
$argsList += "--pip-arg"
$argsList += $arg
}
python @argsList