mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 05:37:51 +00:00
Move chop functionality to Resin CLI Visuals
This commit is contained in:
parent
e769fdc205
commit
d2f319c725
@ -37,8 +37,9 @@ exports.info =
|
||||
resin.models.key.get params.id, (error, key) ->
|
||||
return done(error) if error?
|
||||
|
||||
# TODO: Move this chop functionality to resin.models.key
|
||||
key.public_key = '\n' + _.str.chop(key.public_key, resin.settings.get('sshKeyWidth')).join('\n')
|
||||
sshKeyWidth = resin.settings.get('sshKeyWidth')
|
||||
key.public_key = '\n' + visuals.helpers.chop(key.public_key, sshKeyWidth)
|
||||
|
||||
console.log(visuals.widgets.table.vertical(key, [ 'id', 'title', 'public_key' ]))
|
||||
return done()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user