From 7ed9f7173cdec71a057053d7e6efc20c2c230b95 Mon Sep 17 00:00:00 2001 From: Ethan Wu Date: Sat, 13 Jul 2024 03:51:44 -0400 Subject: [PATCH] fix(lockfile): ensure newline at EOF for lockfile (#1639) ## 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* --- lua/lazy/manage/lock.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazy/manage/lock.lua b/lua/lazy/manage/lock.lua index a1b4c74..b3c4444 100644 --- a/lua/lazy/manage/lock.lua +++ b/lua/lazy/manage/lock.lua @@ -42,7 +42,7 @@ function M.update() f:write(",\n") end end - f:write("\n}") + f:write("\n}\n") f:close() end