Skip to content

Commit

Permalink
fix(lockfile): ensure newline at EOF for lockfile (#1639)
Browse files Browse the repository at this point in the history
## Description

The lockfile currently does not end with a newline at EOF. Text files
should [end with a newline](https://unix.stackexchange.com/a/18789).
This also lets you manually edit the lockfile in vim without 'fixeol'
creating a spurious change for the added newline.

This change however will create a change in users' lockfiles adding a
newline upon updating, but since the lockfile would be changing anyways
to update lazy.nvim itself, this is likely acceptable.

## Related Issue(s)

*none*

## Screenshots

*N/A*
  • Loading branch information
ethanwu10 committed Jul 13, 2024
1 parent 54f70c7 commit 7ed9f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/lazy/manage/lock.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function M.update()
f:write(",\n")
end
end
f:write("\n}")
f:write("\n}\n")
f:close()
end

Expand Down

0 comments on commit 7ed9f71

Please sign in to comment.