Merge pull request #577 from zprjk/fix-wifi-connections-win32
Fix wifiConnections & wifiInterfaces in Windows.
This commit is contained in:
commit
404f5ccb12
@ -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');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user