mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-27 09:21:35 +07:00
fix: keep windows onboarding logs ascii-safe
This commit is contained in:
@@ -60,6 +60,26 @@ describe("onboardCommand", () => {
|
||||
expect(mocks.runNonInteractiveOnboarding).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("logs ASCII-safe Windows guidance before onboarding", async () => {
|
||||
const runtime = makeRuntime();
|
||||
const platformSpy = vi.spyOn(process, "platform", "get").mockReturnValue("win32");
|
||||
|
||||
try {
|
||||
await onboardCommand({}, runtime);
|
||||
|
||||
expect(runtime.log).toHaveBeenCalledWith(
|
||||
[
|
||||
"Windows detected - OpenClaw runs great on WSL2!",
|
||||
"Native Windows might be trickier.",
|
||||
"Quick setup: wsl --install (one command, one reboot)",
|
||||
"Guide: https://docs.openclaw.ai/windows",
|
||||
].join("\n"),
|
||||
);
|
||||
} finally {
|
||||
platformSpy.mockRestore();
|
||||
}
|
||||
});
|
||||
|
||||
it("defaults --reset to config+creds+sessions scope", async () => {
|
||||
const runtime = makeRuntime();
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export async function onboardCommand(opts: OnboardOptions, runtime: RuntimeEnv =
|
||||
if (process.platform === "win32") {
|
||||
runtime.log(
|
||||
[
|
||||
"Windows detected — OpenClaw runs great on WSL2!",
|
||||
"Windows detected - OpenClaw runs great on WSL2!",
|
||||
"Native Windows might be trickier.",
|
||||
"Quick setup: wsl --install (one command, one reboot)",
|
||||
"Guide: https://docs.openclaw.ai/windows",
|
||||
|
||||
Reference in New Issue
Block a user