mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:20:42 +00:00
fix: preserve tui hatch exit flow
This commit is contained in:
@@ -282,9 +282,10 @@ describe("finalizeSetupWizard", () => {
|
||||
confirm: vi.fn(async () => false),
|
||||
});
|
||||
const runtime = createRuntime();
|
||||
let result: Awaited<ReturnType<typeof finalizeSetupWizard>> | undefined;
|
||||
|
||||
try {
|
||||
await finalizeSetupWizard({
|
||||
result = await finalizeSetupWizard({
|
||||
flow: "quickstart",
|
||||
opts: {
|
||||
acceptRisk: true,
|
||||
@@ -345,6 +346,8 @@ describe("finalizeSetupWizard", () => {
|
||||
password: "resolved-gateway-password", // pragma: allowlist secret
|
||||
}),
|
||||
);
|
||||
expect(result).toEqual({ launchedTui: true });
|
||||
expect(setupWizardShellCompletion).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("restores terminal state after failed TUI hatch", async () => {
|
||||
|
||||
@@ -435,7 +435,7 @@ export async function finalizeSetupWizard(
|
||||
} finally {
|
||||
restoreTerminalState("post-setup tui", { resumeStdinIfPaused: true });
|
||||
}
|
||||
launchedTui = true;
|
||||
return { launchedTui: true };
|
||||
} else if (hatchChoice === "web") {
|
||||
const browserSupport = await detectBrowserOpenSupport();
|
||||
if (browserSupport.ok) {
|
||||
|
||||
Reference in New Issue
Block a user