another stupid test fix

This commit is contained in:
DBHeise 2019-01-15 09:42:26 -05:00
parent 15a55e0a65
commit 66946f7b2e

View file

@ -13,10 +13,9 @@ import childProcess from "child_process";
const mkdirSync = function (dirPath) { const mkdirSync = function (dirPath) {
try { try {
fs.mkdirSync(dirPath); fs.mkdirSync(dirPath);
console.log("Folder Ensured: " + dirPath) console.log("Folder Ensured: " + dirPath);
} catch (err) { } catch (err) {
if (err.code !== "EEXIST") throw err; if (err.code !== "EEXIST") throw err;
} }
@ -37,8 +36,8 @@ const newPath = path.join(dir, "src/core/config/modules");
mkdirpSync(newPath); mkdirpSync(newPath);
//Create the default files //Create the default files
fs.writeFileSync(path.join(dir, "src/core/config/modules/OpModules.mjs"), "export default{};\n", {"flag": "w"}); fs.writeFileSync(path.join(newPath, "OpModules.mjs"), "export default{};\n");
fs.writeFileSync(path.join(dir, "src/core/config/OperationConfig.json"), "[]\n", {"flag": "w"}); fs.writeFileSync(path.join(dir, "src/core/config/OperationConfig.json"), "[]\n");
//Run the generateOpsIndex.mjs file //Run the generateOpsIndex.mjs file
childProcess.fork(path.join(dir, "src/core/config/scripts/generateOpsIndex.mjs"), { execArgv: ["--experimental-modules", "--no-warnings", "--no-deprecation"]}); childProcess.fork(path.join(dir, "src/core/config/scripts/generateOpsIndex.mjs"), { execArgv: ["--experimental-modules", "--no-warnings", "--no-deprecation"]});