From 2ead5f450635fec5254fd95e632abf3cc3184136 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Sat, 21 Jun 2025 16:57:57 -0400 Subject: [PATCH] add deprecated env vars warning --- server/lib/config.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server/lib/config.ts b/server/lib/config.ts index cec59488..f6cd240f 100644 --- a/server/lib/config.ts +++ b/server/lib/config.ts @@ -36,13 +36,19 @@ export class Config { if (process.env.APP_BASE_DOMAIN) { console.log( - "You're using deprecated environment variables. Transition to the configuration file. https://docs.fossorial.io/" + "WARNING: You're using deprecated environment variables. Transition to the configuration file. https://docs.fossorial.io/" ); } - // @ts-ignore - if (parsedConfig.users) { - console.log("You're admin credentials are still in the config file. This method of setting admin credentials is deprecated. It is recommended to remove them from the config file."); + if ( + // @ts-ignore + parsedConfig.users || + process.env.USERS_SERVERADMIN_EMAIL || + process.env.USERS_SERVERADMIN_PASSWORD + ) { + console.log( + "WARNING: Your admin credentials are still in the config file or environment variables. This method of setting admin credentials is no longer supported. It is recommended to remove them." + ); } process.env.APP_VERSION = APP_VERSION;