-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
[Error] ENOENT: no such file or directory, lstat 'C:\d' #10281
Comments
And the git panel just shows a progress bar looping forever. |
Which folder do you have open in VS Code? |
The only folder opened in VS Code was D:\stm8\iar1 with about 10 files in it. git commands is in c:\msys64\usr\bin. |
I added c:\msys64\usr\bin to system PATH. |
Can you show me a screenshot of the error? |
No git process in task manager then. |
Do you have any extensions installed? |
I have only installed the following two extensions: |
And do you get the same error when running |
Yes. The same error even after I uninstall the two extensions. |
@bpasero There seems to be some confusion in which the user's workspace ( |
@netjune would you be able to run vs code out of its sources so that we can do some instrumentation in the places where we call lstat? @joaomoreno I do not understand where we call lstat in the renderer that could produce such a message, a quick search I could not find such. |
Yes that beats me too. But errors from the ext host and shared proc both get propagated back, so it could come from anywhere. |
@netjune can you also open the developer console (from help menu) to see if something gets logged? |
@joaomoreno funky, looks like |
@netjune What git version do you have installed? |
git version: 2.8.2 |
Can you try opening another folder? Maybe one inside |
ENOENT: no such file or directory, lstat 'C:\c' |
Which folder did you try to open? |
C:\ti\0730 |
@tapir Can you try with the official git instead of msys, which we don't support? |
@joaomoreno I'll do you one better. I've tried with the official git.exe by appointing the git.path to So the problem is somehow with the path itself. Not the exe. For some reason it just doesn't like |
Might be much more than that since git uses many other tools that live in that path. Closing as we don't support msys git. |
I don't know what you mean. This is a VScode bug. Not MSYS2. I also copied mingw git.exe to any other path and again it worked. So it's not the git it self. It only happens when it's in msys64. And if some other thing in that path make it not work that's VSCode's bug because VSCode should only use git.exe and nothing else. |
Also please stop with "we don't support msys git" thing. MSYS2 is the major player when it comes to C/C++ in Windows after Visual Studio. Not supporting it is not a great idea. |
Reopening due to:
I will install it in that path to confirm this. We don't support msys git. But you are free to contribute a PR which makes it work. |
If there is anything to support I will make a PR. But I really don't understand what you mean by that? How do you think both executables behave differently? To my understanding they work exactly the same way. Also why should VSCode care about where the exe comes from? |
I could not reproduce: So it obviously doesn't have to do with where the exe comes from. It is my understanding that they work the same way too. But clearly they don't. So someone needs to look into it. Since I don't even estimate 0.01% of our users using this version of git, I don't think it is wise to dedicate my time for it. So I suggest, if you feel passionate enough, to attempt to submit a PR. Let's track that here: #13037 |
I have also this bug, but the git binary is the one bundled inside MSYS2. |
I just opened Code and am experiencing exactly the same problem. |
if you just don't want see the annoying warning and don't need the to use git inside vscode, just disable it.
Also change And VSCode does not have any problem with both the old (msysgit) and new git for windows, which is a fork of msys2, and that's why they can't reproduce it. When you use the original msys2 and install git with pacman, VSCode will have trouble with git. And if you just want to use git on windows, stick with git for windows, it has more friendly default settings and works well with most editor and IDEs, while for the raw msys2, sometimes you mess up with PATH and other environment variables. |
I think vscode(or its dependant lib) has issue on handling code path, when using git from msys2 or cygwin.
mklink /j "D:\z" z: can resolve this, and then any other projects in z:\ or sub directory in z:\ like z:\projects\proj1 will also benefit. But if project path is in other partition, like E:\porj, issue will apear again:"ENOENT: no such file or directory, lstat 'D:\e'" Hope it can be fixed soon, why:
|
I was also experiencing this issue! |
Does this help anyone? #4651 |
I didn't use windows too much, and even more rarely now . So I can't feedback. Waiting for others. PS: I don't like the file path style of windows. It will be good if windows support path like: /c/some_dir/some_file.txt |
Have the same bug and I don't use msysgit, I use cygwin64. If I have open in vscode my c:\cygwin64\home...\git folder and then restart vscode, I will, after several seconds of waiting, see the ENOENT: no such file or directory, lstat 'C:\home' error. If I click on the "collapse" icon for the folder, I will see the same error message. |
Cygwin is not yet supported #7998 |
Make sure that the .json file doesnt have a path to an invalid directory under files: I had path pointing to which I copy/pasted from a tutoria. It took some time to figure out, but the error description states what is missing. Please read it clearly and you can resolve on your own. |
@joaomoreno #4651 solves it for me, might want to stick it somewhere in the official docs where crawlers will find it. |
I'd like to add a few points.
Steps to reproduce:
Expected output: Actual output:
On the top the following appears:
Which you can either "close" or "open launch.json" but if you try the latter, nothing happens at all. |
@bviktor This user's issue was indeed related to git. You have another issue, so can you please open a new issue? Ping me in it please. |
Alright, #25138 opened. |
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: