mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:21:23 +00:00
refactor: clarify restoreTerminalState stdin resume option
This commit is contained in:
@@ -47,7 +47,7 @@ describe("runInteractiveOnboarding", () => {
|
||||
|
||||
expect(runtime.exit).toHaveBeenCalledWith(1);
|
||||
expect(mocks.restoreTerminalState).toHaveBeenCalledWith("onboarding finish", {
|
||||
resumeStdin: false,
|
||||
resumeStdinIfPaused: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -59,7 +59,7 @@ describe("runInteractiveOnboarding", () => {
|
||||
|
||||
expect(runtime.exit).not.toHaveBeenCalled();
|
||||
expect(mocks.restoreTerminalState).toHaveBeenCalledWith("onboarding finish", {
|
||||
resumeStdin: false,
|
||||
resumeStdinIfPaused: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ describe("runInteractiveOnboarding", () => {
|
||||
|
||||
expect(mocks.runOnboardingWizard).toHaveBeenCalledOnce();
|
||||
expect(mocks.restoreTerminalState).toHaveBeenCalledWith("onboarding finish", {
|
||||
resumeStdin: false,
|
||||
resumeStdinIfPaused: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -60,7 +60,7 @@ describe("runInteractiveOnboarding", () => {
|
||||
|
||||
expect(runtime.exit).toHaveBeenCalledWith(1);
|
||||
expect(mocks.restoreTerminalState).toHaveBeenCalledWith("onboarding finish", {
|
||||
resumeStdin: false,
|
||||
resumeStdinIfPaused: false,
|
||||
});
|
||||
const restoreOrder =
|
||||
mocks.restoreTerminalState.mock.invocationCallOrder[0] ?? Number.MAX_SAFE_INTEGER;
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function runInteractiveOnboarding(
|
||||
throw err;
|
||||
} finally {
|
||||
// Keep stdin paused so non-daemon runs can exit cleanly (e.g. Docker setup).
|
||||
restoreTerminalState("onboarding finish", { resumeStdin: false });
|
||||
restoreTerminalState("onboarding finish", { resumeStdinIfPaused: false });
|
||||
if (exitCode !== null) {
|
||||
runtime.exit(exitCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user