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 values in envFile #1116

Closed
cyrfer opened this issue Oct 8, 2021 · 3 comments
Closed

multiline values in envFile #1116

cyrfer opened this issue Oct 8, 2021 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors hacktoberfest verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@cyrfer
Copy link
Contributor

cyrfer commented Oct 8, 2021

Is your feature request related to a problem? Please describe.

I am limited in my java application debugging because I need to set a "multiline" value for an environment variable.

Multiline values are supported in other .env implementations like:

Describe the feature you'd like

I would be satisfied with multiline support offered by the dotenv library for .env files. This would greatly help debugging java applications.

It will look like this, where \n characters separate the lines.

SOME_PRIVATE_KEY="-----BEGIN ENCRYPTED PRIVATE KEY-----\nfoo=bar=\n-----END ENCRYPTED PRIVATE KEY-----\n"
@cyrfer cyrfer added the feature-request Request for new features or functionality label Oct 8, 2021
@connor4312 connor4312 added the good first issue Issues identified as good for first-time contributors label Oct 8, 2021
@connor4312
Copy link
Member

Code pointer:

function readEnvFile(file: string): { [key: string]: string } {

@cyrfer
Copy link
Contributor Author

cyrfer commented Oct 8, 2021

@connor4312 thanks for the reference. It looks like an obvious implementation to me. Something like,

const env = dotenv.parse(Buffer.from(buffer));
//for (const line of buffer.split('\n')) {
//   ....
//}

When I cloned the repo I saw these errors in the tests.

  184 passing (10s)
  2 failing

  1) urlUtils
       isLoopback
         totes invalid:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (vscode-js-debug/out/src/common/urlUtils.test.js)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

  2) urlUtils
       isLoopback
         http://[:1:1]/foo:
     Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (vscode-js-debug/out/src/common/urlUtils.test.js)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

@connor4312
Copy link
Member

That's weird. Those tests call to dns.lookup, maybe something is running a little slow on your machine. I wouldn't worry about it.

@connor4312 connor4312 added this to the October 2021 milestone Oct 26, 2021
@connor4312 connor4312 added the verification-needed Verification of issue is requested label Oct 26, 2021
@DonJayamanne DonJayamanne added the verified Verification succeeded label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors hacktoberfest verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants