mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-24 19:39:38 +00:00
fix(installer): skip llama postinstall in Windows source installs
This commit is contained in:
@@ -1262,6 +1262,7 @@ function Install-OpenClawFromGit {
|
||||
$prevPnpmWorkspaceConcurrency = $env:PNPM_CONFIG_WORKSPACE_CONCURRENCY
|
||||
$prevPnpmVerifyDepsBeforeRun = $env:PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN
|
||||
$prevPnpmSideEffectsCache = $env:PNPM_CONFIG_SIDE_EFFECTS_CACHE
|
||||
$prevNodeLlamaPostinstall = $env:NODE_LLAMA_CPP_POSTINSTALL
|
||||
$prevNodeOptions = $env:NODE_OPTIONS
|
||||
$pnpmCommand = Get-PnpmCommandPath
|
||||
if (-not $pnpmCommand) {
|
||||
@@ -1273,6 +1274,7 @@ function Install-OpenClawFromGit {
|
||||
$env:PNPM_CONFIG_WORKSPACE_CONCURRENCY = "1"
|
||||
$env:PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN = "false"
|
||||
$env:PNPM_CONFIG_SIDE_EFFECTS_CACHE = "false"
|
||||
$env:NODE_LLAMA_CPP_POSTINSTALL = "skip"
|
||||
$pushedRepoLocation = $false
|
||||
try {
|
||||
Push-Location -LiteralPath $RepoDir
|
||||
@@ -1320,6 +1322,7 @@ function Install-OpenClawFromGit {
|
||||
$env:PNPM_CONFIG_WORKSPACE_CONCURRENCY = $prevPnpmWorkspaceConcurrency
|
||||
$env:PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN = $prevPnpmVerifyDepsBeforeRun
|
||||
$env:PNPM_CONFIG_SIDE_EFFECTS_CACHE = $prevPnpmSideEffectsCache
|
||||
$env:NODE_LLAMA_CPP_POSTINSTALL = $prevNodeLlamaPostinstall
|
||||
$env:NODE_OPTIONS = $prevNodeOptions
|
||||
}
|
||||
|
||||
|
||||
@@ -363,6 +363,7 @@ describe("install.ps1 failure handling", () => {
|
||||
expect(gitInstallBody).toContain('$env:PNPM_CONFIG_WORKSPACE_CONCURRENCY = "1"');
|
||||
expect(gitInstallBody).toContain('$env:PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN = "false"');
|
||||
expect(gitInstallBody).toContain('$env:PNPM_CONFIG_SIDE_EFFECTS_CACHE = "false"');
|
||||
expect(gitInstallBody).toContain('$env:NODE_LLAMA_CPP_POSTINSTALL = "skip"');
|
||||
expect(gitInstallBody).toContain("$installSucceeded = ($LASTEXITCODE -eq 0)");
|
||||
expect(gitInstallBody).toContain("clearing node_modules and retrying once");
|
||||
expect(gitInstallBody).toContain("Remove-Item -Recurse -Force node_modules");
|
||||
@@ -382,6 +383,7 @@ describe("install.ps1 failure handling", () => {
|
||||
expect(gitInstallBody).toContain(
|
||||
"$env:PNPM_CONFIG_WORKSPACE_CONCURRENCY = $prevPnpmWorkspaceConcurrency",
|
||||
);
|
||||
expect(gitInstallBody).toContain("$env:NODE_LLAMA_CPP_POSTINSTALL = $prevNodeLlamaPostinstall");
|
||||
expect(gitInstallBody).toContain("Add-ToUserPath $binDir");
|
||||
expect(gitInstallBody).toContain('Write-Host "[!] pnpm build failed for the Git checkout"');
|
||||
expect(gitInstallBody).toContain('$entryPath = Join-Path $RepoDir "dist\\\\entry.js"');
|
||||
|
||||
Reference in New Issue
Block a user