CLI: restore terminal state on exit

This commit is contained in:
Shakker
2026-02-03 06:10:19 +00:00
parent d5593d647c
commit 157d6d2db7
3 changed files with 54 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import type { RuntimeEnv } from "../runtime.js";
import type { OnboardOptions } from "./onboard-types.js";
import { defaultRuntime } from "../runtime.js";
import { restoreTerminalState } from "../terminal/restore.js";
import { createClackPrompter } from "../wizard/clack-prompter.js";
import { runOnboardingWizard } from "../wizard/onboarding.js";
import { WizardCancelledError } from "../wizard/prompts.js";
@@ -18,5 +19,7 @@ export async function runInteractiveOnboarding(
return;
}
throw err;
} finally {
restoreTerminalState("onboarding finish");
}
}