Fix windows env path separator

Fix: mason installed binaries path appended to env.PATH when os is windows, the env path separator is ";".
This commit is contained in:
Lilin Lao 2022-07-26 15:22:16 +08:00 committed by Sidhanth Rathod
parent a522cebca8
commit 8eb56b6644

View file

@ -1,5 +1,6 @@
-- add binaries installed by mason.nvim to path -- add binaries installed by mason.nvim to path
vim.env.PATH = vim.env.PATH .. ":" .. vim.fn.stdpath "data" .. "/mason/bin" local is_windows = vim.loop.os_uname().sysname == "Windows_NT"
vim.env.PATH = vim.env.PATH .. (is_windows and ";" or ":") .. vim.fn.stdpath "data" .. "/mason/bin"
-- commands -- commands
vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()" vim.cmd "silent! command! NvChadUpdate lua require('nvchad').update_nvchad()"