fix: Restore env validation for plugins (#6649)

* fix: Restore env validation for plugins

* rever
This commit is contained in:
Tom Moor
2024-03-06 19:13:54 -07:00
committed by GitHub
parent 9bedc2f690
commit 2d879d0939
3 changed files with 17 additions and 27 deletions

View File

@@ -58,19 +58,7 @@ $ node ./build/server/scripts/20210226232041-migrate-authentication.js
}
}
export async function checkEnv() {
await env.validate().then((errors) => {
if (errors.length > 0) {
Logger.warn(
"Environment configuration is invalid, please check the following:\n\n"
);
for (const error of errors) {
Logger.warn("- " + Object.values(error.constraints ?? {}).join(", "));
}
process.exit(1);
}
});
export async function printEnv() {
if (env.isProduction) {
Logger.info(
"lifecycle",