Merge pull request #577 from zprjk/fix-wifi-connections-win32

Fix wifiConnections & wifiInterfaces in Windows.
This commit is contained in:
Sebastian Hildebrandt 2021-09-11 17:16:15 +02:00 committed by GitHub
commit 404f5ccb12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -565,7 +565,7 @@ function wifiConnections(callback) {
} else if (_windows) {
let cmd = 'netsh wlan show interfaces';
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.forEach(part => {
const lines = part.split('\r\n');
@ -661,7 +661,7 @@ function wifiInterfaces(callback) {
} else if (_windows) {
let cmd = 'netsh wlan show interfaces';
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.forEach(part => {
const lines = part.split('\r\n');