add debug logs

This commit is contained in:
martin-mfg
2026-04-19 19:21:25 +02:00
parent f346dcaa73
commit 3b67bd6bcb
+4
View File
@@ -28,9 +28,12 @@ const parsePATsFromEnv = (env) => {
* @returns {Record<string, string | undefined>} `process.env` if available, otherwise `{}`.
*/
const getDefaultEnv = () => {
console.log((typeof process !== "undefined") + " | " + process?.env);
if (typeof process !== "undefined" && process?.env) {
console.log("if branch");
return process.env;
}
console.log("else branch");
return {};
};
@@ -60,6 +63,7 @@ let currentConfig;
* @param {Record<string, string | undefined>} env Environment variables used to build the runtime config.
*/
export const loadConfigFromEnv = (env = getDefaultEnv()) => {
console.log("env: " + JSON.stringify(env));
const whitelist = parseCsv(env.WHITELIST);
const gistWhitelist = parseCsv(env.GIST_WHITELIST);
const excludeRepositories = parseCsv(env.EXCLUDE_REPO) || [];