()
| 276 | |
| 277 | /** Detect whether we have an interactive TTY. CI environments / pipes return false. */ |
| 278 | export function isInteractiveTTY(): boolean { |
| 279 | if (process.env.QODEX_SKIP_SETUP === '1') return false; |
| 280 | if (!process.stdin.isTTY) return false; |
| 281 | if (!process.stdout.isTTY) return false; |
| 282 | // Common CI env vars |
| 283 | if (process.env.CI === 'true' || process.env.CI === '1') return false; |
| 284 | if (process.env.GITHUB_ACTIONS) return false; |
| 285 | return true; |
| 286 | } |
| 287 | |
| 288 | /** Single-line read from stdin, returning the user's input without the trailing newline. */ |
| 289 | function readLine(promptText: string): Promise<string> { |
no outgoing calls
no test coverage detected