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

Do not error out on lines containg spaces #6897

Closed
wants to merge 1 commit into from
Closed

Do not error out on lines containg spaces #6897

wants to merge 1 commit into from

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" [email protected]: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 <[email protected]>
@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