Skip to content

Commit

Permalink
Fix host detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
lwindolf committed Jan 6, 2024
1 parent aebeccb commit dd247f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function get_hosts(socket) {
throw (error);

let hosts = stdout.split(/\n/)
.filter(h => h.match(validHostnameRegex) || h.match(validIpAddressRegex))
.map(s => s.replace(/^[0-9]+ +ssh +/, ''))
.filter(h => h.match(validHostnameRegex) || h.match(validIpAddressRegex))
.filter(s => s.length > 1);
hosts.push('localhost');
socket.send(JSON.stringify({
Expand Down

0 comments on commit dd247f3

Please sign in to comment.