UNPKG

434 BJavaScriptView Raw
1/**
2 * Abstraction around multichoice questions that works in Windows, despite https://github.com/nodejs/node/issues/5384
3 * Uses arrow keys for non-windows and number selection for windows
4 */
5
6var inquirer = require("inquirer");
7var isWindows = /^win/.test(process.platform);
8
9
10module.exports = function(questions) {
11 if (!isWindows) {
12 return questions;
13 }
14 else {
15 questions.type = 'rawlist';
16 return questions;
17 }
18}