Disable "Deploy Plugin by Id" command

Is it possible to disable this command by preferences or code? Or any command.

[original thread by amiramw]

Hello, no it’s not possible by preferences. Maybe with code with inversify unbind

[amiramw]

will unbind work or should I call CommandRegistry.unregisterCommand?

[amiramw]

and if I do that can I be certain that it is called after PluginApiFrontendContribution.registerCommands where it is registered?

yes it’s respecting order of theia extensions in package.json (inversify) so you’ve to unbind it in an extension after plugin-ext

also I think some people wanted to move commands to other extensions

[amiramw]

having command contribution with this code seems to work: commands.unregisterCommand(PluginExtDeployCommandService.COMMAND);