Closed chapb closed 2 years ago
This function seems to be responsible for the addition to .gitignore.
That's interesting. Could it be because of the mode we're in? We're using os.linesep
which should work just fine...
I have run into the same issue, not quite sure if I got it correctly, but in my mind it should actually have: ".envs/", instead of: ".envs/*" - as according to this from the Git Docu, it would ignore only direct childs of /envs directory otherwise, but have as an example the path ".envs/.production/.postgres" included:
The pattern "foo/*", matches "foo/test.json" (a regular file), "foo/bar" (a directory), but it does not match "foo/bar/hello.c" (a regular file), as the asterisk in the pattern does not match "bar/hello.c" which has a slash in it.
It did do the trick for me, to have the ".envs" directory ignored. I am having trouble to re-add the .local directory though - this entry appears not to work for me "!/.envs/.local"
@ArtSphere maybe try clearing the git cache and re add the new line in the gitignore
This function seems to be responsible for the addition to .gitignore.
That's interesting... I'm wondering why we're doing that instead of the Jinja templating we do in the rest of the file. Has anyone tried it? That might fix it
That's interesting. Could it be because of the mode we're in? We're using
os.linesep
which should work just fine...
Looks like you're right! From the docs:
Do not use os.linesep as a line terminator when writing files opened in text mode (the default); use a single '\n' instead, on all platforms.
What happened?
After working through "Getting Up and Running Locally With Docker", on a Windows machine, I ran git init, which triggered the addition of .env and .envs/* to .gitignore.
However, .envs/* was not ignored. Examining .gitignore, the two added lines are terminated with CR, whereas all other lines are terminated CRLF. As such, the ignore was not respected in this instance.
What should've happened instead?
.envs/* should be ignored, preventing production secrets from being exposed in source/version control. If I edit .gitignore manually and add line breaks, the ignore is respected.
Additional details
Host system configuration:
Options selected and/or replay file: