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

installExtensions has no effect when running in WSL #48

Open
r9dtech opened this issue Jun 16, 2024 · 0 comments
Open

installExtensions has no effect when running in WSL #48

r9dtech opened this issue Jun 16, 2024 · 0 comments

Comments

@r9dtech
Copy link

r9dtech commented Jun 16, 2024

I am writing an extension test suite which requires the python extension to be installed.

I have set installExtensions: ['ms-python.vscode-pylance', 'ms-python.vscode-pylance', 'ms-python.python'] in .vscode-test.mjs, but they do not get installed.

My setup is to run VSCode on windows and connect to my ubuntu WSL install. I am also using a dev container (which is running as the root user inside a rootless docker). I suspect that this issue has more to do with WSL than the dev container, but it could be either or both.

If I edit the desktop.mjs from @vscode/test-cli to add more logging, I can see that it runs the following:

/workspaces/myplugin/.vscode-test/vscode-linux-x64-1.90.1/bin/code --extensions-dir=/workspaces/myplugin/.vscode-test/extensions --user-data-dir=/workspaces/myplugin/.vscode-test/user-data --install-extension ms-python.vscode-pylance --install-extension ms-python.python
Ignoring option 'extensions-dir': not supported for code.
Ignoring option 'user-data-dir': not supported for code.
Installing extensions on Dev Container: Devcontainer @ rootless...
Extension 'ms-python.vscode-pylance' v2024.6.1 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.vscode-pylance@1.2.3'.
Extension 'ms-python.python' v2024.8.1 is already installed. Use '--force' option to update to latest version or provide '@<version>' to install a specific version, for example: 'ms-python.python@1.2.3'.

The command exits with code 0, so the output is never shown.

I have worked around it by adding the following code .vscode-test.mjs:

import { env } from 'process';
delete env['VSCODE_IPC_HOOK_CLI'];
env['DONT_PROMPT_WSL_INSTALL'] = 'TRUE';

After which the plugins get installed correctly, but it seems to me that this should work without needing to fiddle with env vars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant