Skip to content
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

Bun env-expand doesn't work between env files #15099

Open
hmidmrii opened this issue Nov 12, 2024 · 0 comments
Open

Bun env-expand doesn't work between env files #15099

hmidmrii opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working runtime

Comments

@hmidmrii
Copy link

What version of Bun is running?

1.1.33+247456b67

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

my .env is:

A=A
B=B$A

and my .env.local is:

C=C$A

my index.ts file:

console.log(JSON.stringify({
    a: import.meta.env.A,
    b: import.meta.env.B,
    c: import.meta.env.C,
}, null, 2));

Bun does expand the correct variables in .env but doesn't in .env.local

What is the expected behavior?

Bun should expand the variables in .env.local

{
  "a": "A",
  "b": "BA",
  "c": "CA",
}

What do you see instead?

Bun doesn't expand the variables in .env.local

{
  "a": "A",
  "b": "BA",
  "c": "C",
}

Additional information

Bun is expanding each env file separately instead of merging the env files (like env-flow) and then expanding them.

@hmidmrii hmidmrii added bug Something isn't working needs triage labels Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime
Projects
None yet
Development

No branches or pull requests

2 participants