mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Use visuals.widgets.select for app create command
This commit is contained in:
parent
a6a3eeae6d
commit
d97a4d9d49
@ -34,7 +34,10 @@ exports.create =
|
||||
|
||||
(callback) ->
|
||||
return callback(null, options.type) if options.type?
|
||||
visuals.patterns.selectDeviceType(callback)
|
||||
|
||||
resin.models.device.getSupportedDeviceTypes (error, deviceTypes) ->
|
||||
return callback(error) if error?
|
||||
visuals.widgets.select('Select a type', deviceTypes, callback)
|
||||
|
||||
(type, callback) ->
|
||||
resin.models.application.create(params.name, type, callback)
|
||||
|
Loading…
Reference in New Issue
Block a user