Skip to content

Commit

Permalink
Make sure log uses final variables values
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarvarela committed Aug 28, 2024
1 parent 85463fa commit 9daa079
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions site/gatsby-site/playwright/memory-mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ export const init = async (extra?: Record<string, Record<string, Record<string,

if (process.env.GATSBY_LOCAL_USER_ID && process.env.GATSBY_LOCAL_USER_ROLES) {

console.log(`Adding local user [${process.env.GATSBY_LOCAL_USER_ID}] with roles [${process.env.GATSBY_LOCAL_USER_ROLES}] \n`);
const userId = process.env.GATSBY_LOCAL_USER_ID;
const roles = process.env.GATSBY_LOCAL_USER_ROLES.split(',');

console.log(`Adding local user [${userId}] with roles [${roles.join(',')}] \n`);

users.push({
first_name: 'Local',
last_name: 'User',
roles: process.env.GATSBY_LOCAL_USER_ROLES.split(',') as string[],
userId: process.env.LOCAL_USER_ID as string,
roles,
userId,
});
}
else if (require.main === module) {
Expand Down

0 comments on commit 9daa079

Please sign in to comment.