fix: fs_watcher not started for .git folders (windows) (#2265)
This fixes the issue described in #2243, where the .git folder's path ends on a weird character produced by `cygpath` when the newline character is fed into it (when using shell=powershell)
This commit is contained in:
parent
e0c7eb5044
commit
f5804ce94e
@ -25,7 +25,7 @@ function M.get_toplevel(cwd)
|
||||
if vim.fn.has "win32" == 1 then
|
||||
-- msys2 git support
|
||||
if has_cygpath then
|
||||
toplevel = vim.fn.system("cygpath -w " .. vim.fn.shellescape(toplevel))
|
||||
toplevel = vim.fn.system("cygpath -w " .. vim.fn.shellescape(toplevel:sub(0, -2)))
|
||||
if vim.v.shell_error ~= 0 then
|
||||
return nil
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user