UNPKG

penguins-eggs

Version:

A remaster system tool, compatible with Arch, Debian, Devuan, Ubuntu and others

25 lines (24 loc) 622 B
/** * ./src/lib/select_address_type.ts * penguins-eggs v.10.0.0 / ecmascript 2020 * author: Piero Proietti * email: piero.proietti@gmail.com * license: MIT */ import inquirer from 'inquirer'; export default async function selectAddressType() { const questions = [ { choices: ['dhcp', 'static'], default: 'dhcp', message: 'Select address type: ', name: 'option', type: 'list' } ]; return new Promise((resolve) => { inquirer.prompt(questions).then((options) => { resolve(options.option); }); }); }