From 7cf077d527aeecf19d10c74ef25d1c4c4b5c480c Mon Sep 17 00:00:00 2001 From: Christian Kuster Date: Thu, 7 Apr 2016 14:38:42 +0200 Subject: [PATCH] Windows Bugfix --- lib/netsh.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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