add exit() when sentinel.hcl check fails
This commit is contained in:
parent
bc5c781c70
commit
8ec5faff67
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
// Most of the Typescript essentials are from: https://www.section.io/engineering-education/how-to-use-typescript-with-nodejs/
|
// Most of the Typescript essentials are from: https://www.section.io/engineering-education/how-to-use-typescript-with-nodejs/
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
import { exit } from "process";
|
||||||
import {generateHereDoc, functionUrls} from "./configHeredoc";
|
import {generateHereDoc, functionUrls} from "./configHeredoc";
|
||||||
import {ripGrep} from "./ripGrep";
|
import {ripGrep} from "./ripGrep";
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ const ensureFileExists = async (filename: string) => {
|
||||||
return await fs.lstatSync(filename).isFile();
|
return await fs.lstatSync(filename).isFile();
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(`${filename} not present. Are you running this in the right directory?`);
|
console.log(`${filename} not present. Are you running this in the right directory?`);
|
||||||
console.log(e);
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue