🐛 Fix 'list-hosts' when empty #13
1 changed files with 22 additions and 19 deletions
|
|
@ -9,8 +9,10 @@ export default ({
|
||||||
user
|
user
|
||||||
}) => {
|
}) => {
|
||||||
screenStream.stdin.write(
|
screenStream.stdin.write(
|
||||||
(user.getHosts().length === 0 ? getString('listHosts.noHosts') :
|
(
|
||||||
new AsciiTable()
|
user.getHosts().length === 0
|
||||||
|
? getString('listHosts.noHosts')
|
||||||
|
: new AsciiTable()
|
||||||
.setHeading('Host', 'URI')
|
.setHeading('Host', 'URI')
|
||||||
.addRowMatrix(user.getHosts().map(host => [
|
.addRowMatrix(user.getHosts().map(host => [
|
||||||
host.chain
|
host.chain
|
||||||
|
|
@ -27,7 +29,8 @@ export default ({
|
||||||
getString('home.hostUri', { host })
|
getString('home.hostUri', { host })
|
||||||
]))
|
]))
|
||||||
.toString()
|
.toString()
|
||||||
.replaceAll('\n', '\r\n'))
|
.replaceAll('\n', '\r\n')
|
||||||
|
)
|
||||||
+
|
+
|
||||||
'\r\n'
|
'\r\n'
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue