Skip to content
Snippets Groups Projects
Commit a82f7384 authored by fu1106jv's avatar fu1106jv
Browse files

- changed Object.keys to Object.entries

parent f2ee3796
No related branches found
No related tags found
No related merge requests found
......@@ -14,8 +14,8 @@ if (Object.values(envVars).every((value) => value === undefined)){
console.error("Error while reading DB Environment variables! Is maybe the .env file missing?");
process.exit(9);
} else if (Object.values(envVars).findIndex((value) => value === undefined) != -1) {
let missingVars = Object.keys(envVars).filter((x,index)=> Object.values(envVars)[index] === undefined);
console.error(`Error while reading DB Environment variables!\n ${missingVars.map(x=>" - " + x + "is missing.\n")} `);
let missingVars = Object.entries(envVars).filter(([key,value])=> value === undefined);
console.error(`Error while reading DB Environment variables!\n ${missingVars.map(x=>" - " + x[0] + "is missing.\n")} `);
process.exit(9);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment