Skip to content

Commit 78c2574

Browse files
committed
plugin-ext-vscode: apply file handlers only for user plugins
This patch fixes an unexpected behavior where Theia would also pick up and deploy .vsix files from the local-plugins directory into the deployedPlugins directory, where they will be treated as user-installed extensions on the next start of theia. Instead, we now only apply the file handlers for .vsix files if they are user extensions. For system plugins, we print a warning message indicating that the plugin has to be unpacked manually. Fixes #13222 Contributed on behalf of STMicroelectronics Signed-off-by: Olaf Lessenich <[email protected]>
1 parent ce39306 commit 78c2574

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/plugin-ext/src/main/node/plugin-deployer-impl.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,15 @@ export class PluginDeployerImpl implements PluginDeployer {
226226

227227
protected async resolveAndHandle(id: string, type: PluginType, options?: PluginDeployOptions): Promise<PluginDeployerEntry[]> {
228228
const entries = await this.resolvePlugin(id, type, options);
229-
await this.applyFileHandlers(entries);
229+
if (type === PluginType.User) {
230+
await this.applyFileHandlers(entries);
231+
} else {
232+
entries.forEach(async entry => {
233+
if (await entry.isFile()) {
234+
this.logger.warn(`Only user plugins will be handled by file handlers, please unpack the plugin '${entry.id()}' manually.`);
235+
}
236+
});
237+
}
230238
await this.applyDirectoryFileHandlers(entries);
231239
return entries;
232240
}

0 commit comments

Comments
 (0)