bug: missing idempotence in update lazy-lock.json between windows and unix #1093
Closed
3 tasks done
Labels
bug
Something isn't working
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10.0 66823fdb
Operating system/version
Ubuntu 22.04 (WSL) and Windows 11 22H2
Describe the bug
lazy-lock.json
updated in Linux has newline as 'LF',but the file updated in Windows has newline as 'CRLF'.
there is no consistency.
Steps To Reproduce
Expected Behavior
saved
lazy-lock.json
has same newline character code wherever updated.the problem caused by file open mode in lazy.manage.lock.lua.
lazy.nvim/lua/lazy/manage/lock.lua
Line 12 in f0cfbf9
Windows's libc
fwrite(3)
converts LF to CRLF in auto if file is opened with "w" mode.use "wb" mode instead of "w", this problem will be resolved.
Repro
The text was updated successfully, but these errors were encountered: