add trace-warnings correctly

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed Nov 7, 2023 at 14:42 UTC c286c21fb6d4ae6ac1d8c9e8e8abd7520791d618
1 file changed +1
meshcentral.js
+1
@@ -454,6 +454,7 @@ function CreateMeshCentralServer(config, args) {
454 obj.launchChildServer = function (startArgs) {
455 const child_process = require('child_process');
456 try { if (process.traceDeprecation === true) { startArgs.unshift('--trace-deprecation'); } } catch (ex) { }
457 + try { if (process.traceProcessWarnings === true) { startArgs.unshift('--trace-warnings'); } } catch (ex) { }
458 childProcess = child_process.execFile(process.argv[0], startArgs, { maxBuffer: Infinity, cwd: obj.parentpath }, function (error, stdout, stderr) {
459 if (childProcess.xrestart == 1) {
460 setTimeout(function () { obj.launchChildServer(startArgs); }, 500); // This is an expected restart.