fix: guard interactive prompts on both stdin and stdout TTY
This commit is contained in:
parent
7331cbdea2
commit
2834445067
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user