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