Skip to content

Conversation

Quintasan
Copy link

This is a breaking change, instead of breaking workflows for existing users. I believe that at this point the spec needs to be adjusted to explicitly tell users that lines not conforming to the VAR=VAL syntax will be ignored.

Should this behaviour turn out to be a huge problem then it can be changed again but with a deprecation notice and a spec change.

There is a feature request for a switch that would prevent docker-compose from reading .env but it only solves the problem of I don't want docker-compose to use my .env file at all (#6741). It's implemented in #6850.

This merge request should be merged with docker/docs#9467 so that the spec reflects the actual behaviour.

Resolves #6511, #6838

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "do-not-error-on-export-env-variables" git@github.com:Quintasan/compose.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

This is a breaking change - #6511

Signed-off-by: Michał Zając <michal.zajac@gmail.com>
@ulyssessouza
Copy link
Collaborator

The PR was closed in favor of the adoption of python-dotenv that solves the problem in a more general way. But anyways, thank you @Quintasan!

@Quintasan Quintasan deleted the do-not-error-on-export-env-variables branch January 27, 2020 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.env with export Lines No Longer Works
3 participants