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

Multiline is not supported #96

Open
rsov opened this issue Jan 19, 2024 · 1 comment
Open

Multiline is not supported #96

rsov opened this issue Jan 19, 2024 · 1 comment

Comments

@rsov
Copy link

rsov commented Jan 19, 2024

According to dotenv README there should be support for multiple lines. However when I try, it only loads the first one.

.env

PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
ASDASDASDASDASD
-----END PRIVATE KEY-----
"

Code:

Future main() async {
  await dotenv.load(fileName: '.env');
  print(dotenv.get("PRIVATE_KEY"));
}

Output:

flutter: "-----BEGIN PRIVATE KEY-----

I believe the bug is coming from this line:

return envString.split('\n');

@java-james
Copy link
Owner

Thanks for raising this issue. I think it would be useful to align with the readme you have linked given it's the original library this was forked from!

I will try find the time to implement this. Otherwise, feel free to contribute with the PR I will be happy to merge and release this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants