Bug in getting the IP address on windows
This commit is contained in:
@@ -47,13 +47,13 @@ async function checkLocalIP() {
|
|||||||
return true;
|
return true;
|
||||||
}).map(line => {
|
}).map(line => {
|
||||||
line = String(line).split(':', 2);
|
line = String(line).split(':', 2);
|
||||||
line[0] = String(line[0]).replace(/[.]/g, "").trim();
|
line[0] = String(line[0]).replace(/[.]/g, "").replace(/[\s]/g, "-").trim();
|
||||||
line[1] = String(line[1]).replace(/(\\r|\\n)/g, "").trim();
|
line[1] = String(line[1]).replace(/(\\r|\\n)/g, "").trim();
|
||||||
return line;
|
return line;
|
||||||
});
|
});
|
||||||
log.DEBUG("Parsed IP Config Results: ", networkConfigLines);
|
log.DEBUG("Parsed IP Config Results: ", networkConfigLines);
|
||||||
log.DEBUG("Local IP address: ", networkConfigLines['IPv4 Address']);
|
log.DEBUG("Local IP address: ", networkConfigLines['IPv4-Address']);
|
||||||
return networkConfigLines['IPv4 Address'];
|
return networkConfigLines['IPv4-Address'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Linux
|
// Linux
|
||||||
|
|||||||
Reference in New Issue
Block a user