mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-31 16:36:24 +00:00
Implement select widget
This commit is contained in:
parent
8ee2568144
commit
51c6a8b4c2
@ -15,6 +15,17 @@ exports.login = (callback) ->
|
||||
}
|
||||
], _.partial(callback, null))
|
||||
|
||||
exports.select = (message, list, callback) ->
|
||||
inquirer.prompt [
|
||||
{
|
||||
type: 'list'
|
||||
name: 'option'
|
||||
message: message or 'Select an option'
|
||||
choices: list
|
||||
}
|
||||
], (response) ->
|
||||
return callback(null, response.option)
|
||||
|
||||
exports.confirmRemoval = (name, callback) ->
|
||||
inquirer.prompt [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user