From c2ea514d1f8aed562d9ab0f75753269a607b826f Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Fri, 21 Jun 2019 15:40:56 -0700 Subject: [PATCH] Fixed bug where 'info' resulted in 'darwin not supported' exception on MacOS --- agents/meshcore.js | 2 +- agents/meshcore.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/meshcore.js b/agents/meshcore.js index 29910339..96595820 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -1696,7 +1696,7 @@ function createMeshCore(agent) response += '\r\lastMeInfo: ' + lastMeInfo + '.'; var oldNodeId = db.Get('OldNodeId'); if (oldNodeId != null) { response += '\r\nOldNodeID: ' + oldNodeId + '.'; } - if (process.platform != 'win32') { response += '\r\nX11 support: ' + require('monitor-info').kvm_x11_support + '.'; } + if (process.platform == 'linux' || process.platform == 'freebsd') { response += '\r\nX11 support: ' + require('monitor-info').kvm_x11_support + '.'; } break; } case 'osinfo': { // Return the operating system information diff --git a/agents/meshcore.min.js b/agents/meshcore.min.js index 29910339..96595820 100644 --- a/agents/meshcore.min.js +++ b/agents/meshcore.min.js @@ -1696,7 +1696,7 @@ function createMeshCore(agent) response += '\r\lastMeInfo: ' + lastMeInfo + '.'; var oldNodeId = db.Get('OldNodeId'); if (oldNodeId != null) { response += '\r\nOldNodeID: ' + oldNodeId + '.'; } - if (process.platform != 'win32') { response += '\r\nX11 support: ' + require('monitor-info').kvm_x11_support + '.'; } + if (process.platform == 'linux' || process.platform == 'freebsd') { response += '\r\nX11 support: ' + require('monitor-info').kvm_x11_support + '.'; } break; } case 'osinfo': { // Return the operating system information