We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If .env file contains
.env
FOO="foo" FOOBAR="$FOO-bar"
nx reads these as $FOO => foo and $FOOBAR => foo, omitting -bar suffix from the latter
nx
$FOO => foo
$FOOBAR => foo
-bar
It should read suffix correctly so that $FOO => foo and $FOOBAR => foo-bar
$FOOBAR => foo-bar
https://github.com/summis/nx-bug-demo
See https://github.com/summis/nx-bug-demo/blob/main/README.md
npx nx report NX Report complete - copy this into the issue template Node : 22.4.1 OS : linux-x64 npm : 10.8.2 nx : 19.3.2 @nrwl/tao : 19.3.2
No response
This seems to have something to do with the dash character (-) after the variable. Other character don't have same issue in my limited testing.
The text was updated successfully, but these errors were encountered:
Hey @summis! Thanks for the report here and the exceptionally simple repro. It really let me track this down very quickly.
The root issue of this is motdotla/dotenv-expand#124 which was introduced when we updated dotenv-expand in #26459.
dotenv-expand
Until the upstream issue is resolved, you can slightly modify your env variables to go back to the old behaviour. In your example, using
FOO="foo" FOOBAR="${FOO}-bar"
will return the correct foo foo-bar output once again.
foo foo-bar
Hope that helps and thanks again for the great-to-work-with issue.
Sorry, something went wrong.
Thank you @MaxKless for the rapid investigation and workaround!
MaxKless
No branches or pull requests
Current Behavior
If
.env
file containsnx
reads these as$FOO => foo
and$FOOBAR => foo
, omitting-bar
suffix from the latterExpected Behavior
It should read suffix correctly so that
$FOO => foo
and$FOOBAR => foo-bar
GitHub Repo
https://github.com/summis/nx-bug-demo
Steps to Reproduce
See https://github.com/summis/nx-bug-demo/blob/main/README.md
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
This seems to have something to do with the dash character (-) after the variable. Other character don't have same issue in my limited testing.
The text was updated successfully, but these errors were encountered: