From 65a3398e83b8c8b9428747950fb30f84d96db16c Mon Sep 17 00:00:00 2001 From: johaoRosasRosillo Date: Wed, 15 Mar 2023 11:24:56 -0300 Subject: [PATCH] fix in get_active_access_point --- lib/agent/providers/network/windows.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/agent/providers/network/windows.js b/lib/agent/providers/network/windows.js index 7d6257759..3324847e8 100644 --- a/lib/agent/providers/network/windows.js +++ b/lib/agent/providers/network/windows.js @@ -60,6 +60,7 @@ exports.get_active_access_point = (callback) => { // eslint-disable-next-line consistent-return exec('netsh wlan show interfaces', (error, stdout) => { if (error) return callback(error); + if (!stdout || stdout == '') return callback(new Error('the command response is empty')); if (!stdout.includes('SSID')) return callback(new Error('Wifi connection unavailable')); try { const info = stdout.split('\n');