add debug logs
This commit is contained in:
@@ -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) || [];
|
||||
|
||||
Reference in New Issue
Block a user