Skip to content

Commit aef9388

Browse files
sjfsjf-oa
andauthored
fix(installer): preserve windows onboarding tui (#84044)
Co-authored-by: sjf-oa <sjf-oa@users.noreply.github.com>
1 parent 1d77170 commit aef9388

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai
1010

1111
### Fixes
1212

13+
- Installer/Windows: launch `install.ps1` onboarding as an attached child process so fresh native Windows installs do not freeze visibly at `Starting setup...` or corrupt the wizard's terminal rendering.
1314
- Agents: include bounded trajectory queued-writer diagnostics in `pi-trajectory-flush` timeout warnings so flush stalls show pending writes, queued bytes, and append state. Fixes #82961. (#82962) Thanks @galiniliev.
1415
- Agents/subagents: recover stale completion announces by retrying unsupported transcript-wait wakes without transcript waiting and forcing a message-tool handoff when the requester run is already stale. Fixes #83699. (#83700) Thanks @galiniliev.
1516
- Agents/subagents: skip stale embedded-run wake probes for dormant completion requesters, so late subagent completions go straight to requester-agent/direct handoff instead of producing `reason=no_active_run` queue noise. (#82964) Thanks @galiniliev.

scripts/install.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,20 @@ function Invoke-OpenClawCommand {
354354
& $commandPath @Arguments
355355
}
356356

357+
function Invoke-InteractiveOpenClawCommand {
358+
param(
359+
[Parameter(ValueFromRemainingArguments = $true)]
360+
[string[]]$Arguments
361+
)
362+
363+
$commandPath = Get-OpenClawCommandPath
364+
if (-not $commandPath) {
365+
throw "openclaw command not found on PATH."
366+
}
367+
368+
$null = Start-Process -FilePath $commandPath -ArgumentList $Arguments -NoNewWindow -Wait -PassThru
369+
}
370+
357371
function Resolve-CommandPath {
358372
param(
359373
[Parameter(Mandatory = $true)]
@@ -875,7 +889,7 @@ function Main {
875889
} else {
876890
Write-Host "Starting setup..." -ForegroundColor Cyan
877891
Write-Host ""
878-
Invoke-OpenClawCommand onboard
892+
Invoke-InteractiveOpenClawCommand onboard
879893
}
880894
}
881895

test/scripts/install-ps1.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,17 @@ describe("install.ps1 failure handling", () => {
111111
expect(mainBody).not.toContain("Remove-LegacySubmodule");
112112
});
113113

114+
it("launches interactive onboarding outside Main's captured output", () => {
115+
const interactiveCommandBody = extractFunctionBody(source, "Invoke-InteractiveOpenClawCommand");
116+
const mainBody = extractFunctionBody(source, "Main");
117+
expect(interactiveCommandBody).toContain("Start-Process");
118+
expect(interactiveCommandBody).toContain("-NoNewWindow");
119+
expect(interactiveCommandBody).toContain("-Wait");
120+
expect(interactiveCommandBody).toContain("-PassThru");
121+
expect(mainBody).toContain('Write-Host "Starting setup..." -ForegroundColor Cyan');
122+
expect(mainBody).toContain("Invoke-InteractiveOpenClawCommand onboard");
123+
});
124+
114125
runIfPowerShell("exits non-zero when run as a script file", () => {
115126
const tempDir = harness.createTempDir("openclaw-install-ps1-");
116127
const scriptPath = join(tempDir, "install.ps1");

0 commit comments

Comments
 (0)