Updated agent-update ARCHID detection on macOS to workaround bug in specific older versions

This commit is contained in:
Bryan Roe 2021-01-16 14:33:06 -08:00
parent 10f1b77006
commit 0a44d8c873
2 changed files with 17 additions and 3 deletions

View File

@ -53,8 +53,15 @@ if (require('MeshAgent').ARCHID == null)
id = require('_GenericMarshal').PointerSize == 4 ? 31 : 30;
break;
case 'darwin':
id = require('os').arch() == 'x64' ? 16 : 29;
break;
try
{
id = require('os').arch() == 'x64' ? 16 : 29;
}
catch (xx)
{
id = 16;
}
break; break;
}
if (id != null) { Object.defineProperty(require('MeshAgent'), 'ARCHID', { value: id }); }
}

View File

@ -18,7 +18,14 @@ if (require('MeshAgent').ARCHID == null)
id = require('_GenericMarshal').PointerSize == 4 ? 31 : 30;
break;
case 'darwin':
id = require('os').arch() == 'x64' ? 16 : 29;
try
{
id = require('os').arch() == 'x64' ? 16 : 29;
}
catch(xx)
{
id = 16;
}
break;
}
if (id != null) { Object.defineProperty(require('MeshAgent'), 'ARCHID', { value: id }); }