fix: exclude .env file from init commit #416#422
Open
2bitburrito wants to merge 3 commits intoMelkeydev:mainfrom
Open
fix: exclude .env file from init commit #416#4222bitburrito wants to merge 3 commits intoMelkeydev:mainfrom
2bitburrito wants to merge 3 commits intoMelkeydev:mainfrom
Conversation
Changed gitignore file.close from defer to explicit so as to ensure .gitignore is written before running git commands
Collaborator
|
@2bitburrito Did you check if this approach works? |
27ae6f4 to
0c8a348
Compare
Author
|
Yep. I wrote a quick n dirty gh action to show it passes on a window's system. It was consistently failing before removing the defer so I do believe that it was a filesystem buffer issue. Apologies if this is at all messy. It's my first pull request for open source. |
07c2a87 to
bc10ca2
Compare
Author
|
I just made a change. Rather than losing the .Defer() I added .Sync() which is safer if an error occurs before the file.Close() is executed. I believe this solves the issue? You can see outputs from the gh actions test: So the file is present in the directory and not being tracked by git. Let me know if I'm missing something crucial. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed gitignore file.close from defer to explicit so as to ensure .gitignore is written before running git commands.
This fixes issue #416.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Problem/Feature
Please include a description of the problem or feature this PR is addressing.
Description of Changes:
Checklist