From ed290a5228816ddb2f03e2cd86939a3d25f40375 Mon Sep 17 00:00:00 2001 From: kpge Date: Tue, 10 Sep 2019 16:09:39 +0800 Subject: [PATCH] quiet plugin unzipping log info Signed-off-by: kpge Apply suggestions from code review Co-Authored-By: Florent BENOIT --- .../plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts | 5 ++--- .../src/main/node/handlers/plugin-theia-file-handler.ts | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts b/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts index 941e0dbca9e58..fca18ea8682ac 100644 --- a/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts +++ b/packages/plugin-ext-vscode/src/node/plugin-vscode-file-handler.ts @@ -37,10 +37,9 @@ export class PluginVsCodeFileHandler implements PluginDeployerFileHandler { } async handle(context: PluginDeployerFileHandlerContext): Promise { - // need to unzip - console.log('unzipping the plugin', context.pluginEntry()); - const unpackedPath = path.resolve(this.unpackedFolder, path.basename(context.pluginEntry().path())); + console.log(`unzipping the VS Code extension '${path.basename(context.pluginEntry().path())}' to directory: ${unpackedPath}`); + await context.unzip(context.pluginEntry().path(), unpackedPath); if (context.pluginEntry().path().endsWith('.tgz')) { const extensionPath = path.join(unpackedPath, 'package'); diff --git a/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts b/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts index 0554b539790e8..c69e4049aa814 100644 --- a/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts +++ b/packages/plugin-ext/src/main/node/handlers/plugin-theia-file-handler.ts @@ -32,10 +32,9 @@ export class PluginTheiaFileHandler implements PluginDeployerFileHandler { } async handle(context: PluginDeployerFileHandlerContext): Promise { - // need to unzip - console.log('unzipping the plugin', context.pluginEntry()); - const unpackedPath = path.resolve(this.unpackedFolder, path.basename(context.pluginEntry().path())); + console.log(`unzipping the plug-in '${path.basename(context.pluginEntry().path())}' to directory: ${unpackedPath}`); + await context.unzip(context.pluginEntry().path(), unpackedPath); context.pluginEntry().updatePath(unpackedPath);