fix(installer): install portable Node directory atomically · openclaw/openclaw@2890b1a
steipete
·
2026-05-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -61,6 +61,7 @@ Docs: https://docs.openclaw.ai
|
61 | 61 | - Plugins/discovery: strip `-plugin` package suffixes when deriving plugin id hints so package names line up with manifest ids. (#85170) Thanks @JulyanXu. |
62 | 62 | - Telegram: preserve fenced code block languages through Markdown rendering so Telegram receives `language-*` code classes. (#85209) Thanks @leno23. |
63 | 63 | - Windows installer: bootstrap a user-local portable Node.js when native Windows has no Node and no winget, Chocolatey, or Scoop, so first-run installs can continue on raw hosts. |
| 64 | +- Windows installer: install the downloaded portable Node.js directory atomically so PowerShell 5.1 first-run bootstraps do not fail while moving zip contents. |
64 | 65 | - fix(integrations): enforce channel read target allowlists [AI]. (#84982) Thanks @pgondhi987. |
65 | 66 | - Agents/heartbeat: route single-owner `session.dmScope=main` direct-message exec and cron event wakes back to the agent main session so async completions no longer strand context in orphan direct-DM queues. Fixes #71581. (#83743) Thanks @Kaspre. |
66 | 67 | - Agents/code-mode: expose outer code-mode `exec` source through the `command` hook alias with `toolKind`/`toolInputKind` discriminators so exec-shaped policies can distinguish code-mode cells. (#83483) Thanks @Kaspre. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -222,8 +222,7 @@ function Install-PortableNode {
|
222 | 222 | throw "Node.js archive did not contain node.exe." |
223 | 223 | } |
224 | 224 | |
225 | | -New-Item -ItemType Directory -Force -Path $portableRoot | Out-Null |
226 | | -Move-Item -Path (Join-Path $nodeDir.FullName "*") -Destination $portableRoot -Force |
| 225 | +Move-Item -LiteralPath $nodeDir.FullName -Destination $portableRoot -Force |
227 | 226 | } finally { |
228 | 227 | if (Test-Path $tmpZip) { |
229 | 228 | Remove-Item -Force $tmpZip |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -128,8 +128,14 @@ describe("install.ps1 failure handling", () => {
|
128 | 128 | expect(depsRootBody).toContain("OpenClaw\\deps"); |
129 | 129 | expect(portableNodeBody).toContain("portable-node"); |
130 | 130 | expect(portableNodeBody).toContain("Ensure-PortableNodeOnUserPath"); |
| 131 | +expect(portableNodeBody).toContain( |
| 132 | +"Move-Item -LiteralPath $nodeDir.FullName -Destination $portableRoot -Force", |
| 133 | +); |
| 134 | +expect(portableNodeBody).not.toContain('Join-Path $nodeDir.FullName "*"'); |
131 | 135 | expect(portableNodePathBody).toContain("Add-ToUserPath $nodeDir"); |
132 | | -expect(userPathBody).toContain('[Environment]::SetEnvironmentVariable("Path", $newUserPath, "User")'); |
| 136 | +expect(userPathBody).toContain( |
| 137 | +'[Environment]::SetEnvironmentVariable("Path", $newUserPath, "User")', |
| 138 | +); |
133 | 139 | expect(portableNodeBody).toContain("Invoke-WebRequest -UseBasicParsing"); |
134 | 140 | expect(resolveNodeBody).toContain("https://nodejs.org/dist/index.json"); |
135 | 141 | expect(resolveNodeBody).toContain("win-$architecture-zip"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。