[CmdletBinding()] param() $ErrorActionPreference = 'Stop' Push-Location (Split-Path -Parent $PSScriptRoot) try { & wsl.exe bash ./scripts/build.sh } finally { Pop-Location } if ($LASTEXITCODE -ne 0) { throw "WSL 构建失败,退出码 $LASTEXITCODE。" }