add exit() when sentinel.hcl check fails

This commit is contained in:
Sean Meininger 2022-10-07 17:39:51 -07:00
parent bc5c781c70
commit 8ec5faff67

View file

@ -1,6 +1,7 @@
#!/usr/bin/env node
// Most of the Typescript essentials are from: https://www.section.io/engineering-education/how-to-use-typescript-with-nodejs/
const fs = require("fs");
import { exit } from "process";
import {generateHereDoc, functionUrls} from "./configHeredoc";
import {ripGrep} from "./ripGrep";
@ -10,7 +11,7 @@ const ensureFileExists = async (filename: string) => {
return await fs.lstatSync(filename).isFile();
} catch(e) {
console.log(`${filename} not present. Are you running this in the right directory?`);
console.log(e);
exit();
}
}