mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 16:03:20 -05:00
Merge branch 'master' of https://github.com/Ylianst/MeshCentral
This commit is contained in:
commit
b420da573b
@ -56,7 +56,8 @@ function __readdirSync_fix(path)
|
|||||||
var sysnative = false;
|
var sysnative = false;
|
||||||
pathstr = require('fs')._fixwinpath(path);
|
pathstr = require('fs')._fixwinpath(path);
|
||||||
if (pathstr.split('\\*').join('').toLowerCase() == process.env['windir'].toLowerCase()) { sysnative = true; }
|
if (pathstr.split('\\*').join('').toLowerCase() == process.env['windir'].toLowerCase()) { sysnative = true; }
|
||||||
var ret = __readdirSync_old(path);
|
|
||||||
|
var ret = require('fs').__readdirSync_old(path);
|
||||||
if (sysnative) { ret.push('sysnative'); }
|
if (sysnative) { ret.push('sysnative'); }
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
@ -222,21 +222,19 @@ if ((!skip) && ((msh.InstallFlags & 2) == 2))
|
|||||||
|
|
||||||
if (!skip)
|
if (!skip)
|
||||||
{
|
{
|
||||||
if (process.platform != 'darwin')
|
if (process.argv.includes('-install') || process.argv.includes('-update'))
|
||||||
{
|
{
|
||||||
if (process.argv.includes('-install') || process.argv.includes('-update'))
|
var p = [];
|
||||||
|
for (var i = 0; i < process.argv.length; ++i)
|
||||||
{
|
{
|
||||||
var p = [];
|
if (process.argv[i].startsWith('--installPath='))
|
||||||
for (var i = 0; i < process.argv.length; ++i)
|
|
||||||
{
|
{
|
||||||
if (process.argv[i].startsWith('--installPath='))
|
p.push('--installPath="' + process.argv[i].split('=').pop() + '"');
|
||||||
{
|
}
|
||||||
p.push('--installPath="' + process.argv[i].split('=').pop() + '"');
|
else if(process.argv[i].startsWith('--'))
|
||||||
}
|
{
|
||||||
else if(process.argv[i].startsWith('--'))
|
p.push(process.argv[i]);
|
||||||
{
|
}
|
||||||
p.push(process.argv[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_install(p);
|
_install(p);
|
||||||
process.exit();
|
process.exit();
|
||||||
@ -274,12 +272,11 @@ if ((!skip) && ((msh.InstallFlags & 2) == 2))
|
|||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (process.platform == 'darwin')
|
||||||
|
{
|
||||||
|
if (!require('user-sessions').isRoot()) { console.log('\n' + translation[lang].elevation); process.exit(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!require('user-sessions').isRoot()) { console.log('\n' + translation[lang].elevation); process.exit(); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (!skip)
|
if (!skip)
|
||||||
|
Loading…
Reference in New Issue
Block a user