Sort the output of balena devices supported alphabetically by slug

Change-type: patch
Signed-off-by: Paulo Castro <paulo@balena.io>
This commit is contained in:
Paulo Castro 2019-09-30 15:02:35 +01:00
parent 101a4bc209
commit d9b417e9e5

View File

@ -130,10 +130,8 @@ exports.supported =
visuals = require('resin-cli-visuals')
balena.models.config.getDeviceTypes().then (deviceTypes) ->
console.log visuals.table.horizontal deviceTypes, [
'slug'
'name'
]
fields = ['slug', 'name']
console.log visuals.table.horizontal(_.sortBy(deviceTypes, fields), fields)
.nodeify(done)
exports.register =