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

[@std/dotenv] can't handle multi line variable #6170

Open
ryanhex53 opened this issue Nov 2, 2024 · 0 comments
Open

[@std/dotenv] can't handle multi line variable #6170

ryanhex53 opened this issue Nov 2, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@ryanhex53
Copy link

Describe the bug

the @std/dotenv library can't handle multi line variable correctly, it only return the first line of the string.

Steps to Reproduce

.env

KEY="one line string
second line string"

main.ts

import { load } from "@std/dotenv";
await load({ export: true });
console.log(Deno.env.get("KEY"));

deno run -A main.ts get output one line string

But if don't use @std/dotenv, only deno run -A --env-file main.ts
main.ts

console.log(Deno.env.get("KEY"));

will get correct output one line string\nsecond line string

Expected behavior

get multiline output one line string\nsecond line string while use @std/dotenv

Environment

  • OS: Window 10
  • deno version: 2.0.4
  • std/dotenv version: 0.225.2
@ryanhex53 ryanhex53 added bug Something isn't working needs triage labels Nov 2, 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 needs triage
Projects
None yet
Development

No branches or pull requests

1 participant