Open sdedic opened 3 months ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.89.1. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
I started experiencing the same issue during vscode testing. For a long time, I had no issues, but my agent pool image updated and cp.spawnSync silently stopped installing the extension required.
Reproduces the error (agent pool vm): OS Build: 22631.3593 Version of VSCode installed by runtest.js: 1.89.1 Powershell version: 5.1.22621.2506 Node version: v20.13.1
Does not reproduce the error (dev machine): OS Build: 22631.3593 Version of VSCode installed by runtest.js: 1.89.1 Powershell version: 5.1.22621.2506 Node version: v20.11.0
Using thecp.spawnSync
shell: true
option works as a workaround for me.
Modern versions of test-electron include a helper you can use, e.g.
await runVSCodeCommand(['--install-extension', 'ms-python.python']);
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
Execute code similar to the one exhibited at https://code.visualstudio.com/api/working-with-extensions/testing-extension#custom-setup-with-vscodetestelectron:
The problem is that on Windows, the
cli
evaluates to%vscodeTestDir%\bin\Code
that is not a Windows executable, but a bash shell script, so direct invocation usingspanwSync
fails. There must beshell: true
option for thespawnSync
that launches the command using windows command shell, that properly recognizes presence ofCode.cmd
and uses that.Please correct the example in the extension development guide.