-
-
Notifications
You must be signed in to change notification settings - Fork 595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any git directory will report [NvimTree] Could not start the fs_event watcher for path C:\test_project\.git : ENOENT #2467
Comments
A newline issue seems plausible. The multiline message is only shown when there is genuinely a newline. Unfortunately I don't have access to or expertise with windows. I'd be most grateful if you could test whether we can actally watch a path with that slash pattern: Please open the following and |
Ok, @alex-courtis, first of all, thanks for dealing with us "Windows PowerShell/Terminal niche market customers"😛. I did this on both Ubuntu and Windows, with the a same folder structure like this: I expected and confirmed on ubuntu everything went well, i can give PATH anything, project1, project2, etc. and it will print "success". I can also :NvimTreeOpen, and navigate to any folder, entering them. git tracking also works, untracked file or modified file will have icons before file name. Interestingly on Windows, everything worked fine as well, the PATHs i tried all printed "success", which are as follow: The problem here on Windows, occurs when in NvimTree File Explorer windows, navigate to a folder that's git initialized(contain a real .git folder) and hit Enter, red error text message will pop up in the console. log: nvim-tree_10151730.zip that's what I have so far. |
This is great, thank you for testing. It seems that we can be flexible around path formats, just not any sort of newline. I'll take a look at normalising paths on the weekend. |
I'd be most grateful if you ran a feature flag audit for your windows powershell, to assist us in dealing with this future issues. Having feature flags we can confidently query may make resolution faster. Please open and :source this feature flag enumerator: |
feature flags log: But, I think I found the problem. Here, line 39 and 43:: nvim-tree.lua/lua/nvim-tree/git/utils.lua Lines 35 to 50 in aaee4cd
Updates for toplevel and git_dir. These two lines of vim.fn.system function use cygpath to convert the paths to Windows form, but the return value of vim.fn.system would add a trailing \n char to the paths, causing them to be invalid. Initially, I thought this is probably a Windows only cygpath quirk that added the \n char. But, then i tried similar thing on Ubuntu, there too, vim.fn.system added trailing \n char, you can try this:
notice the trailing 10 for \n char. The two vim.fn.system calls are inside a Can you confirm this? |
That's fantastic investigation, thank you. I'd be most grateful if you could submit a PR with that fix. I can try, however we will need to go back and forth to test etc. |
Many thanks for the feature flags @mj2068 , it was very enlightening: https://github.com/nvim-tree/nvim-tree.lua/wiki/Development#os-feature-flags |
To avoid shell compatibility issues in msys2 environment on Windows
) * fix(#2467): remove newline in git paths * fix: info size suffix and formatting (#2492) - Now there is a whitespace between value and unit. - Now values >= 1024 YiB are shown in YiB instead of B. - To reuse same code a new local function was added: round(). * feat(#2312): fire `TextYankPost` event on path copy (#2489) * feat(#2312): fire `TextYankPost` event on path copy * stylua * Bug fix --------- Co-authored-by: Alexander Courtis <alex@courtis.org> * feat: mapping and options to sort entries in help window (#2482) * feat: add option to sort entries in help window * stylua * Add keymap to toggle sorting methods * Bug fix --------- Co-authored-by: Alexander Courtis <alex@courtis.org> * fix(#2467): remove newline in git paths * fix(#2467): change cygpath calls to array format To avoid shell compatibility issues in msys2 environment on Windows * stylua nit --------- Co-authored-by: Alexander Courtis <alex@courtis.org> Co-authored-by: Andrew Voynov <37143421+Andrew15-5@users.noreply.github.com> Co-authored-by: Azad <49314270+Akmadan23@users.noreply.github.com>
Description
After a few months without updating any plugins, today i did a :PackerUpdate, opened a random git directory, got this warning:
[NvimTree] Could not start the fs_event watcher for path C:\test_project\.git : ENOENT
After some reading, and comparing the logs with a no-issue ubuntu with mostly the same config. i think there is a newline/return issue there.
I don't think i'm skillful enough to dig deeper, I hope the info i provided here is useful, Thanks.
Neovim version
Operating system and version
Windows 10
nvim-tree version
4054fc4
Clean room replication
unmodified
Steps to reproduce
[NvimTree]
Could not start the fs_event watcher for path C:\test_project.git
: ENOENT
Expected behavior
No response
Actual behavior
nvim-tree.zip
The text was updated successfully, but these errors were encountered: