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

Issue when an extension is disabled #56

Open
colas31 opened this issue Sep 2, 2021 · 2 comments
Open

Issue when an extension is disabled #56

colas31 opened this issue Sep 2, 2021 · 2 comments

Comments

@colas31
Copy link
Contributor

colas31 commented Sep 2, 2021

Hello,

We just faced a strange behavior.
A user already installed a private extension 'A', then disable it in extensions view.
Few month later, he came back in Private extension list, and see the button install under the extension A.
Click on it, but nothing change.

Finally he discover that the extension was disabled.

To sumup: When a private extension is disabled, the user has access to the button Install that does nothing.
It could be better instead to remove this button, and add the button enable instead.

Thanks :)

@joelspadin-garmin
Copy link
Owner

I'd have to investigate further, but it sounds like this may simply be a limitation of the extensions API that extensions.all does not provide info for disabled extensions. I don't see any way in the API to determine if an extension is enabled or disabled, so I suspect you just can't access any information about disabled extensions.

@colas31
Copy link
Contributor Author

colas31 commented Sep 3, 2021

I checked a bit the documetation and perfomed some quick test. indeed the API is limited.
The only way to know if an extension is disabled is to compare the output of code --list-extensions (it returns all installed extensions) and the extensions.all (returns only the activated extensions).
or used the function vscode.extensions.getExtension('') which returns undefined when an extension is installed and disabled.

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

2 participants