Droplr/aws-env

dotenv format wraps values in double quotes

Closed this issue · 2 comments

We're running into a bit of a problem with the -format dotenv flag.

We've noticed that when reading values out of SSM and using -format dotenv, all of the values are wrapped in double quotes. This ends up breaking most of the other services and tools we use that parse these quotes as literal double quotes.

For instance, if the .env file was:

FOO="bar"

Then something that read that environment variable would read it as "bar" instead of the expected bar.

What's the expect way to deal with the double quotes?

orfin commented

Hi,

I have tested it with couple of the most popular .env files processors like

...And all of them accepts “” characters.
Could you tell which dotenv parser are you using?

Thanks for looking into it!

In the latest instance, we were using envy. You're right, it does work with some tools. However, it also breaks with others. That's part of what's hard about this: some of our tools still work, others do not, and others we can sort of hack around.

Is there a flag or something that could be added to not generate the quotes?