@nestjs/cli
Version:
The Nest CLI: create NestJS applications, generate modules, controllers and CRUD resources, and build, run and watch projects and monorepos.
11 lines (10 loc) • 356 B
JavaScript
/**
* Whether the process can ask the user a question.
*
* Prompts need a TTY on stdin. Under CI, a pipe or `execSync`, asking would
* block forever with nothing to answer it, so callers fall back to a
* non-interactive default (or explicit flags) instead of prompting.
*/
export function isInteractive() {
return Boolean(process.stdin.isTTY);
}