-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Suggestions for a fix
Cases like docker/docs#123 and #7164 show a lot of people have been bit by quotation marks becoming part of the value. People may be surprised about this, as most other .env parsers do not consider quotes part of the value. For example:
dotenv, the common node.js parser, handles quotes- Sourcing a
.envon the shell will handle quotes - Most other platform specific parsers will handle quotes
https://github.com/docker/docker.github.io/blob/master/compose/env-file.md mentions:
There is no special handling of quotation marks. This means that they are part of the VAL.
However rather than have people discover this, it may be better to simply handle quotation marks and not include the quote marks in the value.
In our case, we have an iOS developer and a backend developer with different environments due to different parsing tools, and we've spent a bunch of time working out why an API key wasn't working, involving a third party, before working out that docker-compose doesn't handle quotes the same way as other tools, and eventually stumbling on the documentation that says that. I suspect we're not the only one.