diff --git a/lib/netsh.js b/lib/netsh.js index b31116e..0c0c753 100644 --- a/lib/netsh.js +++ b/lib/netsh.js @@ -18,9 +18,13 @@ function parseOutput(str, callback) { var wifis = []; var err = null; try { + if (blocks.length < 2) { + // 2nd try, with \r\n + blocks = str.split('\r\n\r\n') + } if (!blocks || blocks.length === 1) { // No WiFis found - return []; + return callback(null, []); } // Each block has the same structure, while some parts might be available and others