Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu committed Oct 31, 2023
1 parent 5b2a81b commit fb59f13
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion evinser.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ export const prepareDB = async (options) => {
const dirPath = options._[0] || ".";
const bomJsonFile = options.input;
if (!fs.existsSync(bomJsonFile)) {
console.log("Bom file doesn't exist");
console.log(
"Bom file doesn't exist. Check if cdxgen was invoked with the correct type argument."
);
if (!process.env.CDXGEN_DEBUG_MODE) {
console.log(
"Set the environment variable CDXGEN_DEBUG_MODE to debug to troubleshoot the issue further."
);
}
return;
}
const bomJson = JSON.parse(fs.readFileSync(bomJsonFile, "utf8"));
Expand Down

0 comments on commit fb59f13

Please sign in to comment.