simplify requestPVE args

This commit is contained in:
2023-09-12 19:16:19 +00:00
parent 8912ae5f3c
commit 40f36270aa
10 changed files with 66 additions and 60 deletions

View File

@@ -1,4 +1,11 @@
import { readFileSync } from "fs";
import { exit } from "process";
export default (path) => {
return JSON.parse(readFileSync(path));
try {
return JSON.parse(readFileSync(path));
}
catch (e) {
console.log(`Error: ${path} was not found.`);
exit(1);
}
};