You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a string in my .env file with a $ character:
FOO="123$"
I'm using this with vitest and playwright. In vitest, I get an error about escaping a character in my env file that has a $ in it:
dotenv-expand failed to expand env vars. Maybe you need to escape
$?
Escaping said character solves the problem.
Yet when I run playwright, the escaping is not needed and actually is seen as part of the string.
console.log(FOO) // prints 123\$
EDIT: For now we have fixed this by specifically calling dotenv-expand in the playwright file:
dotenvExpand.expand(dotenv.config({ override: true }))
Beta Was this translation helpful? Give feedback.
All reactions