mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 09:11:34 +00:00
fix(install): report source UI build failures correctly (#112053)
This commit is contained in:
@@ -1538,7 +1538,8 @@ function Install-OpenClawFromGit {
|
||||
Write-Host "[!] pnpm install failed for the Git checkout" -ForegroundColor Red
|
||||
return $false
|
||||
}
|
||||
if (-not (& $pnpmCommand ui:build)) {
|
||||
& $pnpmCommand ui:build
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "[!] UI build failed; continuing (CLI may still work)" -ForegroundColor Yellow
|
||||
}
|
||||
$env:NODE_OPTIONS = Resolve-NodeOptionsWithMinOldSpace -NodeOptions $prevNodeOptions -MinOldSpaceMb 8192
|
||||
|
||||
@@ -935,6 +935,8 @@ describe("install.ps1 failure handling", () => {
|
||||
expect(gitInstallBody).toContain(
|
||||
"$env:NODE_OPTIONS = Resolve-NodeOptionsWithMinOldSpace -NodeOptions $prevNodeOptions -MinOldSpaceMb 8192",
|
||||
);
|
||||
expect(gitInstallBody).toMatch(/& \$pnpmCommand ui:build\s+if \(\$LASTEXITCODE -ne 0\)/);
|
||||
expect(gitInstallBody).not.toContain("if (-not (& $pnpmCommand ui:build))");
|
||||
expect(nodeOptionsBody).toContain("--max-old-space-size=$MinOldSpaceMb");
|
||||
expect(nodeOptionsBody).toContain("[Math]::Max");
|
||||
expect(gitInstallBody).toContain("& $pnpmCommand build");
|
||||
|
||||
Reference in New Issue
Block a user