fix: Better approach to check if the system is Windows before setting PATH (#2690)

* Better approach to check if the system is Windows

Now the check for Windows doesn't depend on luv's os_uname() function, which may have a different result if neovim was built on different compilers (MSVC, MinGW, etc).

* remove un-needed parenthesis

---------

Co-authored-by: Sidhanth Rathod <siduck@tutanota.com>
v2.0
Pablo Rodriguez 2 months ago committed by GitHub
parent ccf6bc397f
commit 1a98a451ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -57,7 +57,7 @@ for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
end
-- add binaries installed by mason.nvim to path
local is_windows = vim.loop.os_uname().sysname == "Windows_NT"
local is_windows = vim.fn.has("win32") ~= 0
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
-------------------------------------- autocmds ------------------------------------------

Loading…
Cancel
Save