Update src/main.ts

This commit is contained in:
drudgesentinel 2024-01-12 20:10:08 +00:00
parent 83183b5a3b
commit fb45c23bc6

View file

@ -11,6 +11,7 @@ const checkForCommonFunctions = async (functionsArray: Array<string>) => {
for (const i of functionsArray) {
const exitCode = await ripGrep(i);
// exitCode of 0 indicates a match in ripGrep
// TODO: Add check to sentinel.hcl to prevent writing duplicate entries
if(exitCode === 0) {
console.log(`found import ${i}, appending to sentinel.hcl`);
// Add heredoc to sentinel.hcl file if a match is found