-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotenv-expand breaking build when "$" is used #3961
Comments
This sounds really annoying. Sorry. Do you want to look into what's causing this? |
This does appear to be a bug in |
Right, it looks like this is the problem: https://github.com/motdotla/dotenv-expand/blob/master/lib/main.js#L25 |
Yes. I think there a couple of ways to fix it:
|
This makes sense to me. We should also document that behavior. |
Fixed in |
This reverts commit c263f17.
We use variables that include
$
within the strings, which we don't want to be expanded. Escaping with\$
works fine when it occurs at the start of the string, but not anywhere else within the string.Example:
REACT_APP_MYVAR=\$bar.baz
<- works as expected, value is"$bar.baz"
REACT_APP_MYVAR=foo\$bar.baz
<- I'd expect"foo$bar.baz"
but I get"foo\.baz"
I also tried working around the problem, like so:
But it gave the same result of
"foo\.baz"
The text was updated successfully, but these errors were encountered: