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