Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Don't install extensions through the code CLI #47

Open
dithpri opened this issue May 5, 2021 · 0 comments
Open

Don't install extensions through the code CLI #47

dithpri opened this issue May 5, 2021 · 0 comments

Comments

@dithpri
Copy link

dithpri commented May 5, 2021

The profile switcher invokes an external command to install an extension when switching the profile. binaryFullPath, which is set from getCodeBinary() runs into a similar issue as #46: trying to come up with the code executable's full path is buggy and unreliable.

(getCodeBinary() in my tests returns bin/code. But bin/code is not in $PATH, code is!)

Luckily, there's another way:

vscode.commands.executeCommand('workbench.extensions.installExtension', ext.publisherId);

cf. https://code.visualstudio.com/api/references/commands

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant