-
Notifications
You must be signed in to change notification settings - Fork 24
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
not opening folder when exec in dot directory #14
not opening folder when exec in dot directory #14
Comments
Hmm, I don't see the ".config is a directory and cannot be opened" unless I'm missing the message - I just see an empty vscode window not connected to any directory. (But connected to the container) It seems to be a visual studio code bug where: code --remote attached-container+463334 /var/home/otaylor/tmp/.hidden-repo Doesn't work properly when the argument is a hidden directory, but that's a pretty strange bug! Probably needs some experimentation with vscode not installed as a Flatpak to try and come up with some more minimal reproducer. |
Basically the way this works is that when invoked this way, vscode is guessing whether each argument is a file folder based on the filename before sending it to the remote extension. Visual Studio Code is guessing that ".hidden-repo" is a file because it starts with a dot (Someone once tried to open .zsh_history .... microsoft/vscode-remote-release#3424). You can have problems the other way where it will classify "TODO" as a folder because it doesn't have a dot. Without the "--remote" argument, vscode looks at the actual type of the argument. We can emulate that by converting the raw path arguments to '--file-uri vscode-remote://...' or '--folder-uri vscode-remote:/...' I'll change things to work that way and hopefully it will be more robust. |
Calling Visual Studio Code with '--remote attached-container+<xxx>' <PATH1> <PATH2> Resolves <PATH1> and <PATH2> to folder-or-file based on heuristics before passing them to the remote container. So it's better to check locally whether paths are folders or files and use the --file-uri and --folder-uri arguments. Fixes: #14
Calling Visual Studio Code with '--remote attached-container+<xxx>' <PATH1> <PATH2> Resolves <PATH1> and <PATH2> to folder-or-file based on heuristics before passing them to the remote container. So it's better to check locally whether paths are folders or files and use the --file-uri and --folder-uri arguments. Fixes: #14
Calling Visual Studio Code with '--remote attached-container+<xxx>' <PATH1> <PATH2> Resolves <PATH1> and <PATH2> to folder-or-file based on heuristics before passing them to the remote container. So it's better to check locally whether paths are folders or files and use the --file-uri and --folder-uri arguments. Fixes: owtaylor#14
When
code .
is executed in a dot directory like.config
code will not be able to open the folder by itself. It will just started with an empty page complaing that.config
is a directory and cannot be opened.I am not sure if it is a vscode bug or a bug in this script.
The text was updated successfully, but these errors were encountered: