mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 04:42:03 +00:00
fix(pack): add trailing newline to lockfile #38469
Problem: JSON files should end with a trailing newline so that Unix tools work as expected, Git doesn't report "No newline at end of file" and to avoid noise in diffs from editors and other tools adding the missing newline. Solution: Add trailing newline.
This commit is contained in:
@@ -819,7 +819,7 @@ local function lock_write()
|
||||
local fd = assert(uv.fs_open(path, 'w', 438))
|
||||
|
||||
local data = vim.json.encode(lock, { indent = ' ', sort_keys = true })
|
||||
assert(uv.fs_write(fd, data))
|
||||
assert(uv.fs_write(fd, data .. '\n'))
|
||||
assert(uv.fs_close(fd))
|
||||
end
|
||||
|
||||
|
||||
@@ -574,7 +574,8 @@ describe('vim.pack', function()
|
||||
"version": ">=0.0.0"
|
||||
}
|
||||
}
|
||||
}]]):format(
|
||||
}
|
||||
]]):format(
|
||||
basic_rev,
|
||||
repos_src.basic,
|
||||
defbranch_rev,
|
||||
|
||||
Reference in New Issue
Block a user