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: ensure append is on newline with existing .gitattributes #1602

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

joscha
Copy link
Contributor

@joscha joscha commented Nov 21, 2024

Currently, when running devenv init in a folder that already contains a .gitignore file the first line of the additions is written at the end of the last line of the existing file. If the existing file does not end with a newline, the # Devenv comment is appened at the end of the line.

Example:

An existing .gitignore

dist

(no newline at EOF)
will result in:

dist# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml

@domenkozar domenkozar merged commit 24f0aac into cachix:main Nov 21, 2024
@joscha joscha deleted the patch-1 branch November 21, 2024 09:09
sandydoo added a commit that referenced this pull request Nov 22, 2024
Initially introduced in #1602.
sandydoo added a commit that referenced this pull request Nov 22, 2024
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.

2 participants