Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to use a multi-line value in the .env file?

I’ve tried using double quotes, single quotes, backticks plus the \n char but I get the literal \n characters in the string when evaluated in Java code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

david-arteagacommented, May 5, 2019

Yeah Base64 definitely gets the job done. Did not occur to me at the moment so ended up putting something like __NEWLINE__ in the .env file and then replacing it when reading the values in the Java code. Thanks for taking the time to go over the Java behavior! I do agree with you that it should stay the same as what System.getenv does. Maybe we could add something to the README there is a reference to the issue in the future. Coming in, I thought the newlines would just work and took me well over an hour to realize that was the issue I had, given the use case I had.

cdimasciocommented, Apr 30, 2019

Thanks for the details. This is helpful. Will have a look

Read more comments on GitHub >

github_iconTop Results From Across the Web

6.8 Defining Multi-Line Variables
6.8 Defining Multi-Line Variables. Another way to set the value of a variable is to use the define directive. This directive has an...
Read more >
Creating multiline strings in JavaScript
Update: ECMAScript 6 (ES6) introduces a new type of literal, namely template literals. They have many features, variable interpolation among others, ...
Read more >
JavaScript Multiline String – How to Create Multi Line ...
JavaScript Multiline String – How to Create Multi Line Strings in JS ... A string is an ordered sequence of character values.
Read more >
YAML Multiline Strings
Find the right syntax for your YAML multiline strings. ... (Scalars are what YAML calls basic values like numbers or strings, as opposed...
Read more >
Python Multi Line Strings
Multiline Strings. You can assign a multiline string to a variable by using three quotes: Example. You can use three double quotes:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found