fix wtv-flashrom catch-all error messages

This commit is contained in:
zefie
2022-10-02 17:09:19 -04:00
parent 9d33e86937
commit fee8b768fc
2 changed files with 9 additions and 10 deletions

View File

@@ -140,6 +140,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
clientShowAlert: clientShowAlert,
WTVClientSessionData: WTVClientSessionData,
WTVClientCapabilities: WTVClientCapabilities,
WTVFlashrom: WTVFlashrom,
strftime: strftime,
CryptoJS: CryptoJS,
fs: fs,
@@ -390,16 +391,16 @@ async function processPath(socket, service_vault_file_path, request_headers = ne
var eval_ctx = new vm.Script(script_data, {
"filename": catchall_file
})
eval_ctx.runInNewContext(contextObj, {
"breakOnSigint": true
});
// Here we read back certain data from the ServiceVault Script Context Object
updateFromVM.forEach((item) => {
eval(item[0] + ' = contextObj["' + item[1] + '"]');
})
eval_ctx.runInNewContext(contextObj, {
"breakOnSigint": true
});
// Here we read back certain data from the ServiceVault Script Context Object
updateFromVM.forEach((item) => {
eval(item[0] +' = contextObj["'+item[1]+'"]');
})
if (request_is_async && !minisrv_config.config.debug_flags.quiet) console.log(" * Script requested Asynchronous mode");
break;
} else {
service_check_dir.pop();
}