Fixed bug where 'info' resulted in 'darwin not supported' exception on MacOS

This commit is contained in:
Bryan Roe 2019-06-21 15:40:56 -07:00
parent ebd236c793
commit 1530cfa5ae
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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