Skip to content
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

workspaceFolder no longer accepts VS Code workspace files #4239

Closed
AngellusMortis opened this issue Dec 28, 2020 · 1 comment
Closed

workspaceFolder no longer accepts VS Code workspace files #4239

AngellusMortis opened this issue Dec 28, 2020 · 1 comment
Labels
containers Issue in vscode-remote containers *duplicate Issue identified as a duplicate of another issue(s)

Comments

@AngellusMortis
Copy link

AngellusMortis commented Dec 28, 2020

  • VSCode Version: 1.52.1
  • Local OS Version: Arch Linux
  • Remote OS Version: Debian Stretch I think? (remote OS should not matter, but it was the official Python 2.7 Docker container)
  • Remote Extension/Connection Type: Docker

Steps to Reproduce:

  1. Set workspaceFolder to the path for a VS Code .code-workspace file.
  2. Add a postCreateCommand, postAttachCommand, or postStartCommand

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: N/A

This started happening only with a newer version of VS Code (1.52 most likely, I cannot remember what version I was on before, but I usually update in a somewhat timely manner). Previously, if workspaceFolder was actually set to .code-workspace file, it would open the workspace after attaching VS Code, now it just does not work. It looks like it is because it is setting the -w option (working dir) on docker so now it actually must be a real directory. This was a nice hack to allow for multi-root workspaces inside of Docker containers. The only two folders we had in our workspace was the main app (/app) and a extra Docker Compose only mount for the Docker file (/docker) so the workspace was only to give easy access to the Docker files.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Dec 28, 2020
@chrmarti
Copy link
Contributor

chrmarti commented Jan 4, 2021

That must have worked by chance. We want to investigate opening a workspace using a devcontainer.json property in #3665.

What should work: Place a .devcontainer/devcontainer.json in the folder where the .code-workspace file is stored and make sure all workspace folders are contained in that same folder (possibly in subfolders). This only works if the .code-workspace file exists on the local filesystem.

Closing as duplicate of the above issue.

@chrmarti chrmarti closed this as completed Jan 4, 2021
@chrmarti chrmarti added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 4, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants