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>
This commit is contained in:
parent
cd2dddfc4b
commit
55515ae401
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ for _, provider in ipairs { "node", "perl", "python3", "ruby" } do
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add binaries installed by mason.nvim to path
|
-- 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
|
vim.env.PATH = vim.fn.stdpath "data" .. "/mason/bin" .. (is_windows and ";" or ":") .. vim.env.PATH
|
||||||
|
|
||||||
-------------------------------------- autocmds ------------------------------------------
|
-------------------------------------- autocmds ------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue