From 8ec5faff67ad37f7b25d4efc8260674a17720335 Mon Sep 17 00:00:00 2001 From: Sean Meininger Date: Fri, 7 Oct 2022 17:39:51 -0700 Subject: [PATCH] add exit() when sentinel.hcl check fails --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index f3a1999..9d3263e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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(); } }