From 436b8129217f37fc42dd0cf413b3cf3f7b758f4e Mon Sep 17 00:00:00 2001 From: Mykola Morhun Date: Thu, 30 May 2019 17:58:36 +0300 Subject: [PATCH] Do not use FileUri from client side Signed-off-by: Mykola Morhun --- .../src/hosted/browser/hosted-plugin-manager-client.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/plugin-ext/src/hosted/browser/hosted-plugin-manager-client.ts b/packages/plugin-ext/src/hosted/browser/hosted-plugin-manager-client.ts index 83131c62cda90..092feb4c473c3 100644 --- a/packages/plugin-ext/src/hosted/browser/hosted-plugin-manager-client.ts +++ b/packages/plugin-ext/src/hosted/browser/hosted-plugin-manager-client.ts @@ -27,7 +27,6 @@ import { HostedPluginServer } from '../../common/plugin-protocol'; import { DebugConfiguration as HostedDebugConfig } from '../../common'; import { DebugSessionManager } from '@theia/debug/lib/browser/debug-session-manager'; import { HostedPluginPreferences } from './hosted-plugin-preferences'; -import { FileUri } from '@theia/core/lib/node/file-uri'; /** * Commands to control Hosted plugin instances. @@ -174,7 +173,13 @@ export class HostedPluginManagerClient { this.isDebug = true; await this.start({ debugMode: this.hostedPluginPreferences['hosted-plugin.debugMode'] }); - const outFiles = this.pluginLocation && [path.join(FileUri.fsPath(this.pluginLocation), '**', '*.js')]; + let outFiles: string[] | undefined = undefined; + if (this.pluginLocation) { + const fsPath = await this.fileSystem.getFsPath(this.pluginLocation.toString()); + if (fsPath) { + outFiles = [path.join(fsPath, '**', '*.js')]; + } + } await this.debugSessionManager.start({ configuration: { type: 'node',