forked from viszkoktamas/ossf-sast-ml
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtool.js
More file actions
27 lines (21 loc) · 714 Bytes
/
tool.js
File metadata and controls
27 lines (21 loc) · 714 Bytes
1
/** * Catch and report unexpected error. * @param {any} error The thrown error object. * @returns {void} */function onFatalError(error) { process.exitCode = 2; const { version } = require("./package.json"); console.error(`Oops! Something went wrong! :(OSSF-SAST-ML: ${version}${error}`);}//------------------------------------------------------------------------------// Execution//------------------------------------------------------------------------------(async function main() { process.on("uncaughtException", onFatalError); process.on("unhandledRejection", onFatalError); process.exitCode = await require("./cli").execute(process.argv);}()).catch(onFatalError);