Fix wifiConnections & wifiInterfaces in Windows.

This commit is contained in:
zprjk 2021-09-01 21:50:09 +01:00
parent a2a9c0ffd9
commit a3d6d3856d

View File

@ -565,7 +565,7 @@ function wifiConnections(callback) {
} else if (_windows) { } else if (_windows) {
let cmd = 'netsh wlan show interfaces'; let cmd = 'netsh wlan show interfaces';
exec(cmd, util.execOptsWin, function (error, stdout) { exec(cmd, util.execOptsWin, function (error, stdout) {
const parts = stdout.toString().split(':\r\n\r\n'); const parts = stdout.toString().split(': \r\n\r\n');
parts.shift(); parts.shift();
parts.forEach(part => { parts.forEach(part => {
const lines = part.split('\r\n'); const lines = part.split('\r\n');
@ -661,7 +661,7 @@ function wifiInterfaces(callback) {
} else if (_windows) { } else if (_windows) {
let cmd = 'netsh wlan show interfaces'; let cmd = 'netsh wlan show interfaces';
exec(cmd, util.execOptsWin, function (error, stdout) { exec(cmd, util.execOptsWin, function (error, stdout) {
const parts = stdout.toString().split(':\r\n\r\n'); const parts = stdout.toString().split(': \r\n\r\n');
parts.shift(); parts.shift();
parts.forEach(part => { parts.forEach(part => {
const lines = part.split('\r\n'); const lines = part.split('\r\n');