I currently try to develop a Visual Studio Code extension for extension deployment. What my extension should do is install another extension from the Marktplace.
The obvious way to do that (at least i thought it is) is to create a child process and execute
code --install-extension publisher.extension_name
This command usually works fine, but when it gets executed from within the plugin it returns: "Error: Command failed: bad option: --install-extension".
The first thing i thought is that the extension wouldn't execute the command in the right way, so i tried running "dir C:\Users" just as a test and that worked perfectly fine. After that i tried to run
code --list-extensions
but it returned with the same error. So it looks like I am unable to run any command from within the plugin which uses visual studio code itself. Can someone explain this behaviour ? Does anyone know if there is a better way to install an extension from an extension ?
codewill resolve to the VS Code executable.