gitpod-io / openvscode-server

Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere.
https://www.gitpod.io/
MIT License
4.99k stars 431 forks source link

code -r . <some-other-files> does not work properly on vscode web #439

Closed TimothyStiles closed 2 years ago

TimothyStiles commented 2 years ago

An excellent bug report was submitted by @axonasif to Gitpod's main repo which explains the issue and how to reproduce it. Does anyone know how to fix this?

Quoted below is the text of the original bug report followed by vscode and OS versions that I've added:

Bug description

Trying to reopen the VSCode web instance with a different code-workspace root directory and a relative file to it does not work as expected. This is not an issue on VSCode desktop.

See the video below if it's not fully clear what I mean:

https://user-images.githubusercontent.com/39482679/191192199-8b1648c7-cdb0-4fc9-9baa-b0509f774c94.mp4

Steps to reproduce:

  • Open a workspace on vscode web.

  • Inside your workspace, create a dir, e.g src.

  • Copy or create a file inside the src dir, e.g README.md.

  • Then on your terminal run cd src && code -r . README.md

  • Notice that the vscode-instance switched to src dir as it's code-workspace root but didn't open README.md there, however it got opened on the parent instance.

Expected behavior

The files relative to the new code-workspace root dir should also get opened as like VSCode-desktop.

Anything else?

Originally bought up by @TimothyStiles https://discord.com/channels/816244985187008514/1020773220279922789/1021538242752946196

VS Code Version:

results of running `code -v` in the window's integrated terminal below:

1.71.2
9ae312771e40d3399bac2b7b43c5bb4a1514517c
x64

OS Version:

Firefox 104.0.2