fix: guard interactive prompts on both stdin and stdout TTY

This commit is contained in:
YeonGyu-Kim
2026-02-08 22:09:12 +09:00
parent 7331cbdea2
commit 2834445067

View File

@@ -12,7 +12,7 @@ async function selectOrCancel<TValue extends Readonly<string | boolean | number>
options: Option<TValue>[]
initialValue: TValue
}): Promise<TValue | null> {
if (!process.stdin.isTTY) return null
if (!process.stdin.isTTY || !process.stdout.isTTY) return null
const value = await p.select<TValue>({
message: params.message,