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

fix: dont add new line if empty #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SethFalco
Copy link

If a .gitignore file does exist, it adds a new line to the file even if the file is empty.

This checks the length of the file first, and will only append the initial new line if there was actually any content in the .gitignore file in the first place.

This way, if the extension is used to append content to an empty file, it won't leave a blank line on line 1.

@SethFalco
Copy link
Author

Resolved merge conflicts and updated to suit the new structure.
Have all tests passing and this works is working for me in my local build.

@SethFalco
Copy link
Author

Rebased with master and fixed merge conflicts.

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.

None yet

1 participant