mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-19 17:08:08 +00:00
Print ssh key separately from the information table
Since the public key string is long, it might wrap to lines below, causing the table layout to break. A quick solutio is to print the ssh key after the table. Fixes: - https://github.com/resin-io/resin-cli/issues/151
This commit is contained in:
parent
83382cc8f7
commit
e712e2f266
@ -38,7 +38,8 @@
|
|||||||
permission: 'user',
|
permission: 'user',
|
||||||
action: function(params, options, done) {
|
action: function(params, options, done) {
|
||||||
return resin.models.key.get(params.id).then(function(key) {
|
return resin.models.key.get(params.id).then(function(key) {
|
||||||
return console.log(visuals.table.vertical(key, ['id', 'title', 'public_key']));
|
console.log(visuals.table.vertical(key, ['id', 'title']));
|
||||||
|
return console.log('\n' + key.public_key);
|
||||||
}).nodeify(done);
|
}).nodeify(done);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,15 @@ exports.info =
|
|||||||
permission: 'user'
|
permission: 'user'
|
||||||
action: (params, options, done) ->
|
action: (params, options, done) ->
|
||||||
resin.models.key.get(params.id).then (key) ->
|
resin.models.key.get(params.id).then (key) ->
|
||||||
console.log visuals.table.vertical key, [ 'id', 'title', 'public_key' ]
|
console.log visuals.table.vertical key, [
|
||||||
|
'id'
|
||||||
|
'title'
|
||||||
|
]
|
||||||
|
|
||||||
|
# Since the public key string is long, it might
|
||||||
|
# wrap to lines below, causing the table layout to break.
|
||||||
|
# See https://github.com/resin-io/resin-cli/issues/151
|
||||||
|
console.log('\n' + key.public_key)
|
||||||
.nodeify(done)
|
.nodeify(done)
|
||||||
|
|
||||||
exports.remove =
|
exports.remove =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user